/*
 * Chat widget CSS — standalone (no Tailwind dependency)
 * Scoped under .studio-chatbot namespace
 * Design: Inter font, #1D1D1F text, #6E6E73 secondary, #FF7000 CTA
 */

.studio-chatbot {
  --studio-chatbot-content-max-width: 672px;
  --studio-chatbot-accent: #FF7000;
  --studio-chatbot-accent-hover: #E66500;
  --studio-chatbot-accent-strong: #EA580C;
  --studio-chatbot-accent-soft: rgba(255, 112, 0, 0.1);
  --studio-chatbot-accent-soft-strong: rgba(255, 112, 0, 0.3);
  --studio-chatbot-accent-hover-soft: #FFF7ED;
  --studio-chatbot-accent-hover-border: #FDBA74;
  --studio-chatbot-accent-glow-soft: rgba(255, 112, 0, 0.18);
  --studio-chatbot-accent-glow-medium: rgba(255, 112, 0, 0.28);
  --studio-chatbot-accent-glow-hover-soft: rgba(255, 112, 0, 0.24);
  --studio-chatbot-accent-glow-hover-medium: rgba(255, 112, 0, 0.32);
  --studio-chatbot-accent-glow-key-strong: rgba(255, 112, 0, 0.4);
  --studio-chatbot-accent-glow-key-soft: rgba(255, 112, 0, 0.1);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #1D1D1F;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.studio-chatbot[data-theme="blue"],
.article-chat-modal[data-theme="blue"] {
  --studio-chatbot-accent: #2563EB;
  --studio-chatbot-accent-hover: #1D4ED8;
  --studio-chatbot-accent-strong: #1D4ED8;
  --studio-chatbot-accent-soft: rgba(37, 99, 235, 0.1);
  --studio-chatbot-accent-soft-strong: rgba(37, 99, 235, 0.25);
  --studio-chatbot-accent-hover-soft: #EFF6FF;
  --studio-chatbot-accent-hover-border: #93C5FD;
  --studio-chatbot-accent-glow-soft: rgba(37, 99, 235, 0.18);
  --studio-chatbot-accent-glow-medium: rgba(37, 99, 235, 0.28);
  --studio-chatbot-accent-glow-hover-soft: rgba(37, 99, 235, 0.24);
  --studio-chatbot-accent-glow-hover-medium: rgba(37, 99, 235, 0.32);
  --studio-chatbot-accent-glow-key-strong: rgba(37, 99, 235, 0.4);
  --studio-chatbot-accent-glow-key-soft: rgba(37, 99, 235, 0.1);
}

.studio-chatbot[data-theme="injoy-blue"],
.article-chat-modal[data-theme="injoy-blue"] {
  --studio-chatbot-accent: #003C65;
  --studio-chatbot-accent-hover: #002542;
  --studio-chatbot-accent-strong: #002542;
  --studio-chatbot-accent-soft: rgba(0, 60, 101, 0.1);
  --studio-chatbot-accent-soft-strong: rgba(0, 60, 101, 0.25);
  --studio-chatbot-accent-hover-soft: #E6F0F6;
  --studio-chatbot-accent-hover-border: #7EA9C5;
  --studio-chatbot-accent-glow-soft: rgba(0, 60, 101, 0.18);
  --studio-chatbot-accent-glow-medium: rgba(0, 60, 101, 0.28);
  --studio-chatbot-accent-glow-hover-soft: rgba(0, 60, 101, 0.24);
  --studio-chatbot-accent-glow-hover-medium: rgba(0, 60, 101, 0.32);
  --studio-chatbot-accent-glow-key-strong: rgba(0, 60, 101, 0.4);
  --studio-chatbot-accent-glow-key-soft: rgba(0, 60, 101, 0.1);
}

.studio-chatbot[data-theme="emerald"],
.article-chat-modal[data-theme="emerald"] {
  --studio-chatbot-accent: #059669;
  --studio-chatbot-accent-hover: #047857;
  --studio-chatbot-accent-strong: #047857;
  --studio-chatbot-accent-soft: rgba(5, 150, 105, 0.1);
  --studio-chatbot-accent-soft-strong: rgba(5, 150, 105, 0.25);
  --studio-chatbot-accent-hover-soft: #ECFDF5;
  --studio-chatbot-accent-hover-border: #6EE7B7;
  --studio-chatbot-accent-glow-soft: rgba(5, 150, 105, 0.18);
  --studio-chatbot-accent-glow-medium: rgba(5, 150, 105, 0.28);
  --studio-chatbot-accent-glow-hover-soft: rgba(5, 150, 105, 0.24);
  --studio-chatbot-accent-glow-hover-medium: rgba(5, 150, 105, 0.32);
  --studio-chatbot-accent-glow-key-strong: rgba(5, 150, 105, 0.4);
  --studio-chatbot-accent-glow-key-soft: rgba(5, 150, 105, 0.1);
}

.studio-chatbot[data-theme="rose"],
.article-chat-modal[data-theme="rose"] {
  --studio-chatbot-accent: #E11D48;
  --studio-chatbot-accent-hover: #BE123C;
  --studio-chatbot-accent-strong: #BE123C;
  --studio-chatbot-accent-soft: rgba(225, 29, 72, 0.1);
  --studio-chatbot-accent-soft-strong: rgba(225, 29, 72, 0.25);
  --studio-chatbot-accent-hover-soft: #FFF1F2;
  --studio-chatbot-accent-hover-border: #FDA4AF;
  --studio-chatbot-accent-glow-soft: rgba(225, 29, 72, 0.18);
  --studio-chatbot-accent-glow-medium: rgba(225, 29, 72, 0.28);
  --studio-chatbot-accent-glow-hover-soft: rgba(225, 29, 72, 0.24);
  --studio-chatbot-accent-glow-hover-medium: rgba(225, 29, 72, 0.32);
  --studio-chatbot-accent-glow-key-strong: rgba(225, 29, 72, 0.4);
  --studio-chatbot-accent-glow-key-soft: rgba(225, 29, 72, 0.1);
}

.studio-chatbot[data-theme="slate"],
.article-chat-modal[data-theme="slate"] {
  --studio-chatbot-accent: #475569;
  --studio-chatbot-accent-hover: #334155;
  --studio-chatbot-accent-strong: #334155;
  --studio-chatbot-accent-soft: rgba(71, 85, 105, 0.1);
  --studio-chatbot-accent-soft-strong: rgba(71, 85, 105, 0.25);
  --studio-chatbot-accent-hover-soft: #F8FAFC;
  --studio-chatbot-accent-hover-border: #CBD5E1;
  --studio-chatbot-accent-glow-soft: rgba(71, 85, 105, 0.18);
  --studio-chatbot-accent-glow-medium: rgba(71, 85, 105, 0.28);
  --studio-chatbot-accent-glow-hover-soft: rgba(71, 85, 105, 0.24);
  --studio-chatbot-accent-glow-hover-medium: rgba(71, 85, 105, 0.32);
  --studio-chatbot-accent-glow-key-strong: rgba(71, 85, 105, 0.4);
  --studio-chatbot-accent-glow-key-soft: rgba(71, 85, 105, 0.1);
}

.studio-chatbot,
.studio-chatbot *,
.studio-chatbot *::before,
.studio-chatbot *::after {
  box-sizing: border-box;
}

.studio-chatbot button,
.studio-chatbot input,
.studio-chatbot textarea {
  font-family: inherit;
}

.studio-chatbot input,
.studio-chatbot textarea {
  color: inherit;
}

/* ── Chat Launcher ── */

.studio-chatbot__bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  min-height: 52px;
  max-width: calc(100vw - 48px);
  padding: 0 14px 0 8px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(90deg, var(--studio-chatbot-accent), #ec4899, #8b5cf6, #3b82f6, #10b981, #f59e0b, var(--studio-chatbot-accent), #ec4899) border-box;
  border: 2px solid transparent;
  background-size: 100% 100%, 200% 100%;
  color: #1D1D1F;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition:
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.38s ease,
    filter 0.25s ease,
    box-shadow 0.25s ease;
  z-index: 9998;
  visibility: visible;
  animation: studio-chatbot-rainbow-flow 2s linear infinite, studio-chatbot-rainbow-pulse 2.5s ease-in-out infinite;
}

.studio-chatbot__bubble--preenter {
  opacity: 0;
  visibility: hidden;
  transform: translateY(22px);
  pointer-events: none;
}

.studio-chatbot__bubble--entering {
  animation-play-state: paused !important;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__bubble {
  transform-origin: center bottom;
  transition:
    transform 340ms var(--joyce-ease),
    opacity 260ms ease-out,
    filter 360ms var(--joyce-ease),
    box-shadow 250ms ease;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__bubble--preenter {
  transform: translateY(10px);
  will-change: transform, opacity;
}

.studio-chatbot__bubble::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  animation: studio-chatbot-rainbow-glow 3s ease-in-out infinite;
}

@media (hover: hover) {
  .studio-chatbot__bubble:hover {
    transform: translateY(-1px) scale(1.02);
    filter: brightness(1.04);
    animation: studio-chatbot-rainbow-flow 1.2s linear infinite, studio-chatbot-rainbow-pulse-hover 1.2s ease-in-out infinite;
  }
}

@media (hover: hover) {
  .studio-chatbot__bubble:hover::after {
    opacity: 1;
  }
}

.studio-chatbot__bubble:focus-visible {
  outline: 2px solid var(--studio-chatbot-accent);
  outline-offset: 2px;
}

@keyframes studio-chatbot-rainbow-flow {
  to { background-position: 0 0, -200% 0; }
}

@keyframes studio-chatbot-rainbow-pulse {
  0%, 100% {
    box-shadow:
      0 0 10px var(--studio-chatbot-accent-glow-soft),
      0 0 18px rgba(139, 92, 246, 0.12);
  }
  50% {
    box-shadow:
      0 0 16px var(--studio-chatbot-accent-glow-medium),
      0 0 28px rgba(139, 92, 246, 0.18),
      0 0 36px rgba(236, 72, 153, 0.12);
  }
}

@keyframes studio-chatbot-rainbow-pulse-hover {
  0%, 100% {
    box-shadow:
      0 0 14px var(--studio-chatbot-accent-glow-hover-soft),
      0 0 24px rgba(139, 92, 246, 0.16);
  }
  50% {
    box-shadow:
      0 0 18px var(--studio-chatbot-accent-glow-hover-medium),
      0 0 30px rgba(139, 92, 246, 0.22),
      0 0 42px rgba(236, 72, 153, 0.14);
  }
}

@keyframes studio-chatbot-rainbow-glow {
  0%, 100% { box-shadow: 0 0 18px var(--studio-chatbot-accent-glow-key-strong), 0 0 36px var(--studio-chatbot-accent-glow-key-soft); }
  17% { box-shadow: 0 0 18px rgba(236, 72, 153, 0.4), 0 0 36px rgba(236, 72, 153, 0.1); }
  33% { box-shadow: 0 0 18px rgba(139, 92, 246, 0.4), 0 0 36px rgba(139, 92, 246, 0.1); }
  50% { box-shadow: 0 0 18px rgba(59, 130, 246, 0.4), 0 0 36px rgba(59, 130, 246, 0.1); }
  67% { box-shadow: 0 0 18px rgba(16, 185, 129, 0.4), 0 0 36px rgba(16, 185, 129, 0.1); }
  83% { box-shadow: 0 0 18px rgba(245, 158, 11, 0.4), 0 0 36px rgba(245, 158, 11, 0.1); }
}

.studio-chatbot__bubble-icon {
  color: #1D1D1F;
  font-size: 16px;
  line-height: 1;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.studio-chatbot__bubble-avatar {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 999px;
  display: block;
  overflow: visible;
  pointer-events: none;
  user-select: none;
}

.studio-chatbot__bubble-avatar--idle {
  transform-origin: 50% 50%;
  will-change: transform;
  backface-visibility: hidden;
  animation: fitty-idle 1.6s ease-in-out infinite;
}

.studio-chatbot__bubble-avatar.fitty-bob {
  transform-origin: 50% 50%;
  will-change: transform;
  backface-visibility: hidden;
  animation: fitty-bob 1.5s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
}

.studio-chatbot__bubble-text {
  overflow-wrap: anywhere;
  background-image:
    linear-gradient(90deg, transparent calc(50% - 12px), #a78bfa, transparent calc(50% + 12px)),
    linear-gradient(#1D1D1F, #1D1D1F);
  background-size: 250% 100%, auto;
  background-repeat: no-repeat, no-repeat;
  -webkit-text-fill-color: transparent;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: studio-chatbot-text-shimmer 4s linear infinite;
}

/* The launcher is the chat input, closed: same pill, same send button. The
   text is typed like a visitor's question and ends in a caret, so it reads as
   a field that is ready, not as a label. */
.studio-chatbot .studio-chatbot__bubble {
  justify-content: flex-start;
  gap: 10px;
  width: min(360px, calc(100vw - 48px));
  min-height: 60px;
  padding: 0 10px 0 12px;
  border-radius: 30px;
  font-weight: 400;
  /* Android paints a blue box over a tapped button; the open motion is the feedback. */
  -webkit-tap-highlight-color: transparent;
}

.studio-chatbot .studio-chatbot__bubble-icon,
.studio-chatbot .studio-chatbot__bubble-avatar {
  width: 34px;
  height: 34px;
}

.studio-chatbot .studio-chatbot__bubble-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  /* No letter-spacing here: Chrome 124 on Android stops painting this text
     with a fractional negative value. */
  letter-spacing: 0;
  background: none;
  -webkit-text-fill-color: currentColor;
  color: #4A5560;
  animation: none;
}

.studio-chatbot .studio-chatbot__bubble-text::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 20px;
  margin-left: 2px;
  border-radius: 1px;
  vertical-align: -4px;
  background: var(--studio-chatbot-accent);
  animation: studio-chatbot-launcher-caret 1.1s steps(1, end) infinite;
}

@keyframes studio-chatbot-launcher-caret {
  0%, 55% { opacity: 1; }
  56%, 100% { opacity: 0; }
}

.studio-chatbot__bubble-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--studio-chatbot-accent);
  color: #FFFFFF;
  box-shadow: 0 4px 10px color-mix(in srgb, var(--studio-chatbot-accent) 28%, transparent);
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

.studio-chatbot__bubble-send svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

@media (hover: hover) {
  .studio-chatbot__bubble:hover .studio-chatbot__bubble-send,
  .studio-chatbot__bubble:focus-visible .studio-chatbot__bubble-send {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px color-mix(in srgb, var(--studio-chatbot-accent) 32%, transparent);
  }
}

@media (max-width: 639px) {
  .studio-chatbot .studio-chatbot__bubble {
    width: calc(100vw - 32px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .studio-chatbot .studio-chatbot__bubble-text::after {
    animation: none;
  }

  .studio-chatbot__bubble-send {
    transition: none;
  }
}

.studio-chatbot__bubble-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--studio-chatbot-accent-strong);
  background-color: var(--studio-chatbot-accent-soft);
  animation: studio-chatbot-badge-ping 4s linear infinite;
}

@keyframes studio-chatbot-text-shimmer {
  0% { background-position: 100% 0, 0 0; }
  40%, 100% { background-position: 0 0, 0 0; }
}

@keyframes studio-chatbot-badge-ping {
  0%, 25% { background-color: var(--studio-chatbot-accent-soft); }
  38% { background-color: var(--studio-chatbot-accent-soft-strong); }
  55%, 100% { background-color: var(--studio-chatbot-accent-soft); }
}

.studio-chatbot__bubble--hidden {
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  pointer-events: none;
  visibility: hidden;
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.24s ease,
    filter 0.25s ease,
    box-shadow 0.25s ease,
    visibility 0s linear 0.32s;
}

/* ── Modal Overlay ── */

.studio-chatbot__overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  background-color: rgba(17, 24, 39, 0.52);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: opacity 300ms ease-in-out;
}

.studio-chatbot__overlay--hidden {
  display: none;
}

.studio-chatbot__overlay--visible {
  opacity: 1;
  pointer-events: auto;
}

.studio-chatbot__bubble--closing-reveal {
  z-index: 10001;
}

/* ── Chat Window ── */

.studio-chatbot__window {
  --studio-chatbot-keyboard-offset: 0px;
  --studio-chatbot-viewport-height: min(82vh, 760px);
  position: relative;
  width: min(896px, calc(100vw - 48px));
  height: var(--studio-chatbot-viewport-height);
  max-height: var(--studio-chatbot-viewport-height);
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border-radius: 24px;
  border: 1px solid #E8E8ED;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  overflow: hidden;
  opacity: 1;
  transform: none;
  transform-origin: center bottom;
  will-change: auto;
}

.article-chat-modal {
  --studio-chatbot-keyboard-offset: var(--article-chat-keyboard-offset, 0px);
  --studio-chatbot-viewport-height: min(82vh, 760px);
  width: min(896px, calc(100vw - 48px));
  height: var(--studio-chatbot-viewport-height);
  max-height: var(--studio-chatbot-viewport-height);
  transform-origin: center bottom;
  will-change: transform, opacity;
}

.studio-chatbot__window--hidden {
  display: none;
}

/* ── Header ── */

.studio-chatbot__header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #FFFFFF;
  border-bottom: 1px solid #E5E7EB;
  flex-shrink: 0;
}

.studio-chatbot__header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.studio-chatbot__header-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--studio-chatbot-accent-soft, #F3F4F6);
  color: var(--studio-chatbot-accent, #FF7000);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__header-icon {
  background: transparent;
  overflow: visible;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__header-avatar .studio-chatbot__avatar-fallback {
  object-fit: contain;
}

.studio-chatbot__header-icon svg {
  width: 16px;
  height: 16px;
}

.studio-chatbot__header-avatar {
  width: 100%;
  height: 100%;
  padding: 3px;
  object-fit: contain;
  border-radius: 9999px;
  display: block;
  overflow: hidden;
}

.studio-chatbot__header-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.studio-chatbot__header-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.025em;
  color: #1D1D1F;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-chatbot__header-subtitle {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.045em;
  color: #6E6E73;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-chatbot__header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.studio-chatbot__header-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--studio-chatbot-accent, #FF7000);
  padding: 0;
  transition: background-color 160ms ease, color 160ms ease, transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.studio-chatbot__header-btn svg {
  width: 18px;
  height: 18px;
}

@media (hover: hover) {
  .studio-chatbot__header-btn:hover {
    background: var(--studio-chatbot-accent-soft, #F5F5F7);
    transform: translateY(-1px);
  }
}

.studio-chatbot__header-btn--voice[data-voice-muted="false"] {
  background: #EEF2FF;
  color: #1D4ED8;
}

.studio-chatbot__header-btn--voice[data-voice-playing="true"] {
  background: #DBEAFE;
  color: #1D4ED8;
}

.studio-chatbot__header-btn:focus-visible {
  outline: 2px solid var(--studio-chatbot-accent);
  outline-offset: -2px;
}

/* ── Messages ── */

.studio-chatbot__messages {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  overflow-anchor: none;
  -webkit-overflow-scrolling: touch;
  padding: 40px 20px calc(16px + var(--studio-chatbot-keyboard-offset));
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  transition: padding-bottom 220ms ease;
}

.studio-chatbot__messages--welcome {
  justify-content: flex-start;
  padding-top: 24px;
  padding-bottom: calc(24px + var(--studio-chatbot-keyboard-offset, 0px));
}

.studio-chatbot__sheet-handle {
  display: none;
}

.studio-chatbot__messages > * {
  width: 100%;
  max-width: var(--studio-chatbot-content-max-width);
  margin-left: auto;
  margin-right: auto;
}

.studio-chatbot__stream-dock {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.studio-chatbot__stream-dock > * {
  max-width: 100%;
}

.studio-chatbot__welcome-panel {
  width: 100%;
  max-width: var(--studio-chatbot-content-max-width);
  margin: 0 auto;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 8px;
}

.studio-chatbot__welcome-panel--transition-out {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 180ms ease, transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.studio-chatbot__welcome-panel--transition-out.studio-chatbot__welcome-panel--hidden {
  opacity: 0;
  transform: translateY(-10px) scale(0.992);
  pointer-events: none;
}

.studio-chatbot__messages--transition-enter {
  opacity: 0;
  transform: translateY(14px) scale(0.994);
}

.studio-chatbot__messages--transition-enter.studio-chatbot__messages--transition-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 180ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.studio-chatbot[data-source="embed"] .studio-chatbot__welcome-panel--with-avatar {
  position: relative;
}

.studio-chatbot[data-source="embed"] .studio-chatbot__welcome-panel--with-avatar .studio-chatbot__welcome-eyebrow,
.studio-chatbot[data-source="embed"] .studio-chatbot__welcome-panel--with-avatar .studio-chatbot__welcome-title,
.studio-chatbot[data-source="embed"] .studio-chatbot__welcome-panel--with-avatar .studio-chatbot__welcome-text {
  padding-right: 184px;
}

.studio-chatbot__welcome-avatar {
  width: 112px;
  height: 112px;
  object-fit: contain;
  display: block;
  overflow: visible;
  pointer-events: auto;
  user-select: none;
}

.studio-chatbot__welcome-avatar--idle {
  position: absolute;
  right: 20px;
  top: 24px;
  --fitty-dir: -1;
}

.studio-chatbot__welcome-avatar--idle:not(.studio-chatbot__avatar-animated) {
  transform-origin: 50% 50%;
  will-change: transform;
  backface-visibility: hidden;
  animation: fitty-idle 1.6s ease-in-out infinite;
}

.studio-chatbot__welcome-eyebrow {
  margin: 0;
  color: var(--studio-chatbot-accent, #FF7000);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.studio-chatbot__welcome-title {
  margin: 0;
  color: #1D1D1F;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
  font-size: clamp(2.25rem, 6vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
  overflow-wrap: normal;
  text-wrap: balance;
}

.studio-chatbot__welcome-text {
  max-width: 46rem;
  margin: 8px 0 0;
  color: #6E6E73;
  font-size: 17px;
  line-height: 1.45;
}

.studio-chatbot__welcome-quickstart {
  margin: 22px 0 8px;
  color: #3A3A3C;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

.studio-chatbot__welcome-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.studio-chatbot__welcome-input {
  width: 100%;
  margin-top: 24px;
}

.studio-chatbot__welcome-input .studio-chatbot__composer {
  max-width: 100%;
  margin: 0;
}

.studio-chatbot__composer--with-avatar {
  min-height: 64px;
}

.studio-chatbot__composer--with-avatar .studio-chatbot__input {
  min-height: 64px;
  max-height: 64px;
  padding-top: 19px;
  padding-bottom: 19px;
  padding-left: 66px;
  padding-right: 70px;
  line-height: 1.35;
}

.studio-chatbot__composer-avatar {
  position: absolute;
  top: 50%;
  left: 16px;
  z-index: 2;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  pointer-events: auto;
}

.studio-chatbot__composer-avatar[hidden] {
  display: none !important;
}

.studio-chatbot__composer-avatar .studio-chatbot__welcome-avatar,
.studio-chatbot__composer-avatar .studio-chatbot__composer-avatar-img,
.studio-chatbot__composer-avatar [data-assistant-avatar="true"] {
  width: 100%;
  height: 100%;
}

.studio-chatbot__avatar-node {
  display: block;
  box-sizing: border-box;
}

.studio-chatbot__avatar-static {
  object-fit: contain;
  object-position: center;
}

.studio-chatbot__composer-avatar .studio-chatbot__welcome-avatar--idle {
  position: static;
  right: auto;
  top: auto;
}

.studio-chatbot__composer-avatar-img.fitty-idle {
  animation: fitty-idle 1.6s ease-in-out infinite;
}

.studio-chatbot__composer-avatar-img.fitty-bob {
  animation: fitty-bob 1.5s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
}

.studio-chatbot__welcome-question {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  border-radius: 999px;
  min-height: 44px;
  padding: 9px 14px;
  text-align: left;
  color: #3A3A3C;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.studio-chatbot__welcome-question-text {
  text-align: left;
}

@media (hover: hover) {
  .studio-chatbot__welcome-question:hover {
    color: var(--studio-chatbot-accent, #FF7000);
    border-color: color-mix(in srgb, var(--studio-chatbot-accent, #FF7000) 55%, #FFFFFF);
    background: color-mix(in srgb, var(--studio-chatbot-accent, #FF7000) 6%, #FFFFFF);
  }
}

.studio-chatbot__welcome-question:focus-visible {
  outline: 2px solid var(--studio-chatbot-accent, #FF7000);
  outline-offset: 1px;
}

.studio-chatbot__welcome-booking-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  margin-top: 8px;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  background-color: var(--studio-chatbot-accent, #FF7000);
  border: none;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  transform-origin: 50% 50%;
  transition: opacity 140ms ease, transform 180ms cubic-bezier(0.4, 0, 0.2, 1), filter 140ms ease, background-color 0.15s ease;
  will-change: opacity, transform, filter;
}

.chat-shell__welcome-cta-shell {
  width: 100%;
  max-width: none;
  align-self: stretch;
  box-sizing: border-box;
  margin-top: 8px;
  max-height: 72px;
  overflow: hidden;
  transition: max-height 180ms cubic-bezier(0.4, 0, 0.2, 1), opacity 140ms ease, transform 180ms cubic-bezier(0.4, 0, 0.2, 1), margin 180ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: max-height, opacity, transform, margin;
}

.chat-shell__welcome-cta-shell .studio-chatbot__welcome-booking-cta {
  width: 100%;
  max-width: none;
  margin-top: 0;
  transform-origin: 50% 0;
  backface-visibility: hidden;
  will-change: transform, opacity, filter;
  transition: background-color 0.15s ease, opacity 180ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1), filter 220ms ease;
}

@media (hover: hover) {
  .studio-chatbot__welcome-booking-cta:hover {
    background-color: var(--studio-chatbot-accent-hover, #E66500);
  }
}

.studio-chatbot__welcome-booking-cta:focus-visible {
  outline: 2px solid var(--studio-chatbot-accent, #FF7000);
  outline-offset: 2px;
}

.studio-chatbot__handoff-banner {
  width: 100%;
  max-width: var(--studio-chatbot-content-max-width);
  margin: 0 auto 12px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--studio-chatbot-accent, #FF7000) 32%, #FFFFFF);
  border-radius: 8px;
  background: color-mix(in srgb, var(--studio-chatbot-accent, #FF7000) 10%, #FFFFFF);
  color: #3A3A3C;
  font-size: 13px;
  line-height: 1.4;
}

.studio-chatbot__message {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.studio-chatbot__message--user {
  align-items: flex-end;
}

.studio-chatbot__message--bot {
  align-items: flex-start;
}

.studio-chatbot__message--error {
  align-items: flex-start;
}

.studio-chatbot__message-body {
  width: 100%;
}

.studio-chatbot__message-body--assistant {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.studio-chatbot__message-avatar {
  width: 84px;
  height: 84px;
  margin-top: 0;
  border-radius: 0;
  object-fit: contain;
  display: block;
  overflow: visible;
  flex-shrink: 0;
  user-select: none;
  pointer-events: auto;
}

.studio-chatbot__message-avatar--inline {
  position: static;
  width: 24px;
  height: 24px;
  margin: 0;
}

.studio-chatbot__avatar-animated {
  position: relative;
  contain: layout;
  isolation: isolate;
}

.studio-chatbot__avatar-fallback,
.studio-chatbot__avatar-lottie,
.studio-chatbot__avatar-lottie svg {
  width: 100%;
  height: 100%;
  display: block;
}

.studio-chatbot__avatar-fallback {
  border-radius: inherit;
  object-fit: contain;
  opacity: 1;
  transition: opacity 220ms ease;
  will-change: opacity;
  pointer-events: none;
}

.studio-chatbot__header-avatar .studio-chatbot__avatar-fallback {
  object-fit: cover;
}

.studio-chatbot__avatar-lottie {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: visible;
  opacity: 0;
  transition: opacity 220ms ease;
  will-change: opacity;
  pointer-events: none;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.studio-chatbot__avatar-lottie svg {
  transform: translateZ(0);
  backface-visibility: hidden;
}

.studio-chatbot__avatar-animated[data-fitty-layer-visible="true"][data-fitty-layer-painted="true"] .studio-chatbot__avatar-fallback {
  opacity: 0;
}

.studio-chatbot__avatar-lottie[data-fitty-layer-visible="true"] {
  opacity: 1;
}

.studio-chatbot__avatar-animated.studio-chatbot__welcome-avatar--idle {
  transform: scaleX(-1);
}

.studio-chatbot__message-avatar.fitty-idle {
  animation: fitty-idle 1.6s ease-in-out infinite;
}

.studio-chatbot__message-avatar.fitty-bob {
  animation: fitty-bob 1.5s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
}

.studio-chatbot__message--bot[data-has-avatar="true"] .studio-chatbot__message-meta-row--assistant,
.studio-chatbot__message--error[data-has-avatar="true"] .studio-chatbot__message-meta-row--assistant {
  padding-left: 32px;
}

.studio-chatbot__message--bot[data-avatar-placement="inline"],
.studio-chatbot__message--error[data-avatar-placement="inline"],
.studio-chatbot__message--bot[data-avatar-placement="header"],
.studio-chatbot__message--error[data-avatar-placement="header"] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.studio-chatbot__message--bot[data-avatar-placement="inline"] .studio-chatbot__message-bubble,
.studio-chatbot__message--error[data-avatar-placement="inline"] .studio-chatbot__message-bubble {
  width: auto;
  max-width: 100%;
}

.studio-chatbot__message-inline-body {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.studio-chatbot__message-inline-body > .studio-chatbot__message-bubble {
  flex: 1 1 auto;
  min-width: 0;
}

.studio-chatbot__message-inline-body > .studio-chatbot__message-bubble--bot {
  padding-left: 0;
  padding-right: 0;
}

.studio-chatbot__message--bot[data-avatar-placement="header"] .studio-chatbot__message-bubble--bot {
  width: 100%;
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.studio-chatbot__message-inline-content {
  min-width: 0;
  max-width: none;
  padding-top: 2px;
}

.studio-chatbot__message--bot[data-avatar-placement="inline"] .studio-chatbot__message-bubble--bot > .studio-chatbot__followup-pills,
.studio-chatbot__message--error[data-avatar-placement="inline"] .studio-chatbot__message-bubble--bot > .studio-chatbot__followup-pills {
  width: 100%;
  margin-left: 0;
}

.studio-chatbot__message-bubble {
  max-width: 90%;
  padding: 12px 16px;
  border-radius: 16px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.studio-chatbot__message-bubble--user {
  background: var(--studio-chatbot-accent, #FF7000);
  color: #FFFFFF;
  border-bottom-right-radius: 6px;
}

.studio-chatbot__message-bubble--collapsible {
  position: relative;
  padding-right: 40px;
}

.studio-chatbot__message-bubble--bot {
  background: transparent;
  border: none;
  box-shadow: none;
  color: #1D1D1F;
  border-radius: 0;
  padding-top: 4px;
  padding-bottom: 4px;
}

.studio-chatbot__message-bubble--error {
  background: #FEF2F2;
  color: #991B1B;
  border-bottom-left-radius: 6px;
  font-size: 13px;
}

.studio-chatbot__message-text ul,
[data-message-text="true"] ul {
  list-style: disc;
  margin: 6px 0;
  padding-left: 1.25rem;
}

.studio-chatbot__message-text ol,
[data-message-text="true"] ol {
  list-style: decimal;
  margin: 6px 0;
  padding-left: 1.25rem;
}

.studio-chatbot__message-text li + li,
[data-message-text="true"] li + li {
  margin-top: 2px;
}

.studio-chatbot__message-link {
  color: var(--studio-chatbot-accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--studio-chatbot-accent) 50%, transparent);
  text-underline-offset: 2px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

@media (hover: hover) {
  .studio-chatbot__message-link:hover {
    color: var(--studio-chatbot-accent-hover);
    text-decoration-color: color-mix(in srgb, var(--studio-chatbot-accent-hover) 60%, transparent);
  }
}

.studio-chatbot__message-text a.studio-chatbot__source-pill,
[data-message-text="true"] a.studio-chatbot__source-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 22px;
  margin: 0 2px;
  padding: 2px 7px;
  border: 1px solid #D1D1D6;
  border-radius: 9999px;
  background: #FFFFFF;
  color: #515154;
  font-size: 0.82em;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  vertical-align: baseline;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

@media (hover: hover) {
  .studio-chatbot__message-text a.studio-chatbot__source-pill:hover,
  [data-message-text="true"] a.studio-chatbot__source-pill:hover {
    border-color: #B0B0B3;
    background: #F5F5F7;
    color: #1D1D1F;
    opacity: 1;
    text-decoration: none;
  }
}

.studio-chatbot__message-text a.studio-chatbot__source-pill:focus-visible,
[data-message-text="true"] a.studio-chatbot__source-pill:focus-visible {
  outline: 2px solid var(--studio-chatbot-accent);
  outline-offset: 2px;
}

.studio-chatbot__response-chip {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 9999px;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
}

.studio-chatbot__response-chip--accent {
  color: #FFFFFF;
  background: var(--studio-chatbot-accent);
  border: 1px solid var(--studio-chatbot-accent);
}

@media (hover: hover) {
  .studio-chatbot__response-chip--accent:hover {
    background: var(--studio-chatbot-accent-hover);
    border-color: var(--studio-chatbot-accent-hover);
  }
}

.studio-chatbot__response-chip--neutral {
  color: #6E6E73;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
}

@media (hover: hover) {
  .studio-chatbot__response-chip--neutral:hover {
    color: var(--studio-chatbot-accent);
    background: var(--studio-chatbot-accent-hover-soft);
    border-color: var(--studio-chatbot-accent-hover-border);
  }
}

.studio-chatbot__link-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  white-space: nowrap;
  border-radius: 9999px;
  border: 1px solid var(--studio-chatbot-accent-hover-border);
  background: var(--studio-chatbot-accent-hover-soft);
  color: var(--studio-chatbot-accent);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

@media (hover: hover) {
  .studio-chatbot__link-chip:hover {
    background: color-mix(in srgb, var(--studio-chatbot-accent-hover-soft) 70%, #FFFFFF);
    color: var(--studio-chatbot-accent-hover);
    border-color: var(--studio-chatbot-accent);
  }
}

.studio-chatbot__message-text {
  white-space: normal;
  word-wrap: break-word;
  font-size: 16px;
  line-height: 1.5;
}

.studio-chatbot__message-text--user {
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.4;
}

.studio-chatbot__message[data-message-variant="welcome"] .studio-chatbot__message-text {
  color: #515154;
}

.studio-chatbot__message[data-message-variant="welcome"] .studio-chatbot__message-text strong {
  display: block;
  margin-bottom: 8px;
  color: #1D1D1F;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.studio-chatbot__message[data-message-variant="welcome"] .studio-chatbot__message-text strong + br,
.studio-chatbot__message[data-message-variant="welcome"] .studio-chatbot__message-text strong + br + br {
  display: none;
}

.studio-chatbot__message[data-message-variant="welcome"] .studio-chatbot__followup-pills {
  margin-top: 16px;
}

.studio-chatbot__message-text--clamped {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.studio-chatbot__message-toggle {
  position: absolute;
  right: 8px;
  bottom: 7px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}

@keyframes fitty-bob {
  0%, 100% {
    transform: translate3d(0, 0, 0) scaleX(var(--fitty-dir, 1)) scale(1);
  }
  12% {
    transform: translate3d(0, 0, 0) scaleX(var(--fitty-dir, 1)) scale(1.06, 0.94);
  }
  36% {
    transform: translate3d(0, -9px, 0) scaleX(var(--fitty-dir, 1)) scale(0.98, 1.02);
  }
  54% {
    transform: translate3d(0, 0, 0) scaleX(var(--fitty-dir, 1)) scale(1.03, 0.97);
  }
  70% {
    transform: translate3d(0, -3px, 0) scaleX(var(--fitty-dir, 1)) scale(0.995, 1.005);
  }
  82% {
    transform: translate3d(0, 0, 0) scaleX(var(--fitty-dir, 1)) scale(1);
  }
}

@keyframes fitty-idle {
  0%, 100% {
    transform: translate3d(0, 0, 0) scaleX(var(--fitty-dir, 1)) scale(1);
  }
  50% {
    transform: translate3d(0, -2.8px, 0) scaleX(var(--fitty-dir, 1)) scale(1.018);
  }
}

.studio-chatbot__message-meta {
  padding: 0 4px;
  font-size: 12px;
  line-height: 1.3;
  color: #6E6E73;
}

.studio-chatbot__message-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.studio-chatbot__message-meta-row--assistant {
  --studio-chatbot-meta-control-height: 28px;
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 8px;
  margin-bottom: var(--studio-chatbot-feedback-picker-space, 0);
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow: visible;
}

.studio-chatbot__message-meta-row--assistant.studio-chatbot__message-meta-row--feedback-celebrating {
  z-index: 30;
  overflow: visible;
}

.studio-chatbot__message-meta-row--assistant > .studio-chatbot__message-meta,
.studio-chatbot__message-meta-row--assistant > .studio-chatbot__message-copy,
.studio-chatbot__message-meta-row--assistant > .studio-chatbot__answer-feedback {
  position: relative;
  top: -8px;
}

.studio-chatbot__message-meta-row--assistant > .studio-chatbot__message-copy,
.studio-chatbot__message-meta-row--assistant > .studio-chatbot__answer-feedback {
  z-index: 2;
}

.studio-chatbot__message-meta-row--assistant > .studio-chatbot__message-meta {
  display: inline-flex;
  align-items: center;
  height: var(--studio-chatbot-meta-control-height);
  line-height: 1;
}

.studio-chatbot__message-meta-row--assistant > .studio-chatbot__message-copy {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

[data-message-wrapper="true"]:has(> .studio-chatbot__message-meta-row--feedback-celebrating) {
  position: relative;
  z-index: 20;
  overflow: visible;
  clip-path: none !important;
}

.studio-chatbot__message-meta-row--user {
  align-self: flex-end;
  justify-content: flex-end;
}

.studio-chatbot__message-meta--hidden {
  display: none;
}

.studio-chatbot__answer-feedback {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-left: auto;
  padding-inline-end: 16px;
  overflow: visible;
  color: var(--chatbot-muted, #667085);
  font-size: 12px;
  line-height: 1.3;
}

.studio-chatbot__answer-feedback button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  border: 1px solid rgba(102, 112, 133, 0.28);
  border-radius: 999px;
  background: #fff;
  color: inherit;
  cursor: pointer;
  min-height: 28px;
  padding: 0.25rem 0.6rem;
  font: inherit;
  overflow: visible;
}

@media (hover: hover) {
  .studio-chatbot__answer-feedback button:hover,
  .studio-chatbot__answer-feedback button:focus-visible {
    border-color: var(--chatbot-accent, #f97316);
    color: var(--chatbot-accent, #f97316);
  }
}

.studio-chatbot__message-meta-row--assistant > .studio-chatbot__answer-feedback--choosing-reason {
  z-index: 50;
}

.studio-chatbot__feedback-reason-picker {
  position: absolute;
  z-index: 5;
  top: calc(100% + 10px);
  right: 16px;
  width: min(360px, calc(100vw - 72px));
  padding: 12px;
  border: 1px solid #D8E2E8;
  border-radius: 14px;
  background: #FFFFFF;
  box-shadow: 0 16px 36px rgba(5, 25, 40, 0.18);
  color: #263D4C;
  animation: joyce-feedback-picker-enter 180ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.studio-chatbot__feedback-reason-title {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.studio-chatbot__feedback-reason-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.studio-chatbot__feedback-reason-option {
  display: inline-flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #D8E2E8;
  border-color: #D8E2E8;
  border-radius: 10px;
  background: #F5F8FA;
  color: #263D4C;
  cursor: pointer;
  font: inherit;
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}

@media (hover: hover) {
  .studio-chatbot__feedback-reason-option:hover,
  .studio-chatbot__feedback-reason-option:focus-visible {
    border-color: var(--studio-chatbot-accent, #003C65);
    background: #EDF4F8;
    color: var(--studio-chatbot-accent, #003C65);
  }
}

@keyframes joyce-feedback-picker-enter {
  0% {
    opacity: 0;
    transform: translate3d(0, -6px, 0) scale(0.985);
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

.studio-chatbot__message-meta-row--assistant > .studio-chatbot__answer-feedback--saved {
  z-index: 40;
  pointer-events: none;
}

.studio-chatbot__answer-feedback--saved[data-feedback-rating="helpful"] {
  --joyce-feedback-color: #16A34A;
  --joyce-feedback-soft: rgba(34, 197, 94, 0.2);
}

.studio-chatbot__answer-feedback--saved[data-feedback-rating="unhelpful"] {
  --joyce-feedback-color: #E11D48;
  --joyce-feedback-soft: rgba(244, 63, 94, 0.2);
}

.studio-chatbot__answer-feedback-icon {
  position: relative;
  z-index: 2;
  display: inline-flex;
  transform-origin: 50% 85%;
}

.studio-chatbot__answer-feedback-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}

.studio-chatbot__answer-feedback--saved .studio-chatbot__answer-feedback-prompt,
.studio-chatbot__answer-feedback--saved button:not(.studio-chatbot__answer-feedback-button--selected) {
  animation: joyce-feedback-dismiss 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.studio-chatbot__answer-feedback--saved .studio-chatbot__answer-feedback-button--selected {
  z-index: 3;
  border-color: transparent;
  background: color-mix(in srgb, var(--joyce-feedback-color) 12%, #FFFFFF);
  color: var(--joyce-feedback-color);
  box-shadow: 0 7px 18px var(--joyce-feedback-soft);
  animation: joyce-feedback-thumb-celebrate 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.studio-chatbot__answer-feedback--saved .studio-chatbot__answer-feedback-button--selected .studio-chatbot__answer-feedback-icon {
  animation: joyce-feedback-icon-celebrate 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.studio-chatbot__answer-feedback--saved .studio-chatbot__answer-feedback-button--selected::before,
.studio-chatbot__answer-feedback--saved .studio-chatbot__answer-feedback-button--selected::after {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.studio-chatbot__answer-feedback--saved .studio-chatbot__answer-feedback-button--selected::before {
  inset: -5px;
  border: 2px solid var(--joyce-feedback-color);
  border-radius: 999px;
  animation: joyce-feedback-ring 720ms ease-out both;
}

.studio-chatbot__answer-feedback--saved .studio-chatbot__answer-feedback-button--selected::after {
  inset: -15px;
  background:
    radial-gradient(circle at 50% 0%, var(--joyce-feedback-color) 0 2px, transparent 2.5px),
    radial-gradient(circle at 88% 18%, #3B82F6 0 2px, transparent 2.5px),
    radial-gradient(circle at 100% 54%, #A855F7 0 2px, transparent 2.5px),
    radial-gradient(circle at 80% 92%, #F59E0B 0 2px, transparent 2.5px),
    radial-gradient(circle at 20% 92%, #14B8A6 0 2px, transparent 2.5px),
    radial-gradient(circle at 0% 52%, #F43F5E 0 2px, transparent 2.5px),
    radial-gradient(circle at 12% 16%, #84CC16 0 2px, transparent 2.5px);
  animation: joyce-feedback-burst 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes joyce-feedback-dismiss {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(5px, 2px, 0) scale(0.72);
  }
}

@keyframes joyce-feedback-thumb-celebrate {
  0% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
  18% { transform: translate3d(0, 2px, 0) scale(0.72) rotate(-7deg); }
  46% { transform: translate3d(0, -8px, 0) scale(1.4) rotate(5deg); }
  68% { transform: translate3d(0, 1px, 0) scale(0.92) rotate(-2deg); }
  84% { transform: translate3d(0, -1px, 0) scale(1.08) rotate(1deg); }
  100% { transform: translate3d(0, 0, 0) scale(1.04) rotate(0deg); }
}

@keyframes joyce-feedback-icon-celebrate {
  0%, 18% { transform: scale(1) rotate(0deg); }
  48% { transform: scale(1.28) rotate(-8deg); }
  72% { transform: scale(0.96) rotate(3deg); }
  100% { transform: scale(1.08) rotate(0deg); }
}

@keyframes joyce-feedback-ring {
  0% { opacity: 0; transform: scale(0.35); }
  34% { opacity: 0.9; }
  100% { opacity: 0; transform: scale(1.8); }
}

@keyframes joyce-feedback-burst {
  0% { opacity: 0; transform: scale(0.4) rotate(-12deg); }
  38% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.35) rotate(12deg); }
}

.studio-chatbot__message-copy {
  position: relative;
  isolation: isolate;
  width: 24px;
  min-width: 24px;
  max-width: 24px;
  height: 24px;
  border: 1px solid #E5E7EB;
  border-radius: 999px;
  background: #FFFFFF;
  color: #6E6E73;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  padding: 0;
  overflow: visible;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  opacity: 0;
  transform: translateY(2px);
  pointer-events: none;
  transition: color 0.2s ease, border-color 0.2s ease, opacity 0.15s ease, transform 0.15s ease;
}

.studio-chatbot__message-copy-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}

.studio-chatbot__message--bot:focus-within .studio-chatbot__message-copy,
.studio-chatbot__message-copy:focus-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  border-color: #D1D5DB;
  color: #1D1D1F;
}
@media (hover: hover) {
  .studio-chatbot__message--bot:hover .studio-chatbot__message-copy,
  .studio-chatbot__message-copy:hover {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    border-color: #D1D5DB;
    color: #1D1D1F;
  }
}

.studio-chatbot__message-copy-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%) translateY(2px);
  border: 1px solid #E5E7EB;
  border-radius: 999px;
  background: #FFFFFF;
  color: #1D1D1F;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  padding: 4px 8px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.12);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.studio-chatbot__message-copy[data-copied="true"] .studio-chatbot__message-copy-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.studio-chatbot__message-copy[data-copied="true"] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.studio-chatbot__message-meta-row--assistant > .studio-chatbot__message-copy--celebrating {
  --joyce-copy-color: var(--studio-chatbot-accent, #003C65);
  --joyce-copy-soft: color-mix(in srgb, var(--joyce-copy-color) 20%, transparent);
  z-index: 40;
  opacity: 1;
  pointer-events: auto;
  border-color: transparent;
  background: color-mix(in srgb, var(--joyce-copy-color) 12%, #FFFFFF);
  color: var(--joyce-copy-color);
  box-shadow: 0 7px 18px var(--joyce-copy-soft);
  animation: joyce-copy-celebrate 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.studio-chatbot__message-copy--celebrating .studio-chatbot__message-copy-icon {
  position: relative;
  z-index: 2;
  animation: joyce-copy-icon-celebrate 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.studio-chatbot__message-copy--celebrating::before,
.studio-chatbot__message-copy--celebrating::after {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.studio-chatbot__message-copy--celebrating::before {
  inset: -5px;
  border: 2px solid var(--joyce-copy-color);
  border-radius: 999px;
  animation: joyce-feedback-ring 720ms ease-out both;
}

.studio-chatbot__message-copy--celebrating::after {
  inset: -15px;
  background:
    radial-gradient(circle at 50% 0%, var(--joyce-copy-color) 0 2px, transparent 2.5px),
    radial-gradient(circle at 88% 18%, #3B82F6 0 2px, transparent 2.5px),
    radial-gradient(circle at 100% 54%, #A855F7 0 2px, transparent 2.5px),
    radial-gradient(circle at 80% 92%, #F59E0B 0 2px, transparent 2.5px),
    radial-gradient(circle at 20% 92%, #14B8A6 0 2px, transparent 2.5px),
    radial-gradient(circle at 0% 52%, #F43F5E 0 2px, transparent 2.5px),
    radial-gradient(circle at 12% 16%, #84CC16 0 2px, transparent 2.5px);
  animation: joyce-feedback-burst 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes joyce-copy-celebrate {
  0% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
  18% { transform: translate3d(0, 2px, 0) scale(0.74) rotate(-9deg); }
  46% { transform: translate3d(0, -6px, 0) scale(1.34) rotate(6deg); }
  68% { transform: translate3d(0, 1px, 0) scale(0.92) rotate(-3deg); }
  84% { transform: translate3d(0, -1px, 0) scale(1.08) rotate(1deg); }
  100% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
}

@keyframes joyce-copy-icon-celebrate {
  0%, 18% { transform: scale(1) rotate(0deg); }
  48% { transform: scale(1.24) rotate(-8deg); }
  72% { transform: scale(0.96) rotate(3deg); }
  100% { transform: scale(1.06) rotate(0deg); }
}

.studio-chatbot__message-text strong {
  font-weight: 600;
}

.studio-chatbot__link-row {
  display: block;
  width: 100%;
  margin-top: 8px;
}

.studio-chatbot__link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--studio-chatbot-accent);
  background-color: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

@media (hover: hover) {
  .studio-chatbot__link-btn:hover {
    background-color: #F9FAFB;
    border-color: #D1D5DB;
  }
}

.studio-chatbot__message-text a {
  color: var(--studio-chatbot-accent);
  text-decoration: underline;
}

@media (hover: hover) {
  .studio-chatbot__message-text a:hover {
    opacity: 0.8;
  }
}

.studio-chatbot__message-text a.studio-chatbot__link-btn {
  color: var(--studio-chatbot-accent);
  text-decoration: none;
  opacity: 1;
}
@media (hover: hover) {
  .studio-chatbot__message-text a.studio-chatbot__link-btn:hover {
    color: var(--studio-chatbot-accent);
    text-decoration: none;
    opacity: 1;
  }
}

.studio-chatbot__message-text ul {
  margin: 4px 0;
  padding-left: 16px;
  list-style: disc;
}

.studio-chatbot__message-text li {
  margin: 2px 0;
}

.studio-chatbot__message-image {
  display: block;
  width: 100%;
  height: auto;
  margin: 10px 0 4px;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  background: #F8FAFC;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  object-fit: cover;
}

.studio-chatbot__message-image-fallback {
  display: block;
  margin: 10px 0 4px;
  padding: 10px 12px;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  color: #6B7280;
  background: #F8FAFC;
  font-size: 13px;
  line-height: 1.35;
}

.studio-chatbot__followup-pills {
  position: relative;
  width: 100%;
  max-width: none;
  margin-top: 10px;
}

.studio-chatbot__followup-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  /* A scroll row clips on every side: the padding leaves room for the pill
     shadows, the negative margin puts the first pill back on the text edge. */
  margin: -8px 0 -8px -24px;
  padding: 16px 28px 32px 24px;
}

.studio-chatbot__followup-scroll::-webkit-scrollbar {
  display: none;
}

.studio-chatbot__followup-fade {
  position: absolute;
  z-index: 1;
  top: 8px;
  bottom: 24px;
  width: 68px;
  opacity: 1;
  pointer-events: none;
  transition: opacity 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.studio-chatbot__followup-fade--start {
  left: -24px;
  background: linear-gradient(90deg, #FFFFFF 22%, rgba(255, 255, 255, 0.86) 54%, transparent);
}

.studio-chatbot__followup-fade--end {
  right: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.86) 46%, #FFFFFF 78%);
}

.studio-chatbot__followup-fade--hidden {
  opacity: 0 !important;
}

.studio-chatbot__followup-pill {
  padding: 8px 12px;
  min-height: 40px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid #D1D1D6;
  border-radius: 9999px;
  background: #FFFFFF;
  color: #6E6E73;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

@media (hover: hover) {
  .studio-chatbot__followup-pill:hover {
    border-color: var(--studio-chatbot-accent-hover-border);
    color: var(--studio-chatbot-accent);
    background-color: var(--studio-chatbot-accent-hover-soft);
  }
}

.studio-chatbot__followup-pill:focus-visible {
  outline: 2px solid var(--studio-chatbot-accent);
  outline-offset: 2px;
}

.studio-chatbot__followup-pill--link {
  text-decoration: none;
}

.studio-chatbot__followup-pill--action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 16px;
  border-color: var(--studio-chatbot-accent);
  background: var(--studio-chatbot-accent);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--studio-chatbot-accent) 24%, transparent);
}

@media (hover: hover) {
  .studio-chatbot__followup-pill--action:hover,
  .studio-chatbot__followup-pill--action:focus-visible {
    border-color: var(--studio-chatbot-accent-hover);
    background: var(--studio-chatbot-accent-hover);
    color: #FFFFFF;
  }
}

.studio-chatbot__followup-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) {
  .studio-chatbot__followup-pill--action:hover .studio-chatbot__followup-action-icon,
  .studio-chatbot__followup-pill--action:focus-visible .studio-chatbot__followup-action-icon {
    transform: translateX(3px);
  }
}

.studio-chatbot__followup-pill--action:disabled {
  cursor: wait;
  opacity: 0.64;
  box-shadow: none;
  transform: none;
}

.studio-chatbot__retry-bubble {
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: background-color 0.15s ease;
}

@media (hover: hover) {
  .studio-chatbot__retry-bubble:hover {
    background: #FEE2E2;
  }
}

.studio-chatbot__retry-bubble:focus-visible {
  outline: 2px solid var(--studio-chatbot-accent);
  outline-offset: 1px;
}

/* ── Typing Indicator ── */

.studio-chatbot__typing-dots {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
}

.studio-chatbot__typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6E6E73;
  animation: studio-chatbot-typing 1.4s infinite ease-in-out both;
}

.studio-chatbot__typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.studio-chatbot__typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

.studio-chatbot__typing-dot:nth-child(3) {
  animation-delay: 0s;
}

@keyframes studio-chatbot-typing {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ── Suggested Question Chips ── */

.studio-chatbot__suggested-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0;
}

.studio-chatbot__suggested-chip {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid #D1D1D6;
  border-radius: 18px;
  background: #FFFFFF;
  color: #6E6E73;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.3;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

@media (hover: hover) {
  .studio-chatbot__suggested-chip:hover {
    background: #F5F5F7;
    color: #1D1D1F;
    border-color: #1D1D1F;
  }
}

.studio-chatbot__suggested-chip:focus-visible {
  outline: 2px solid var(--studio-chatbot-accent);
  outline-offset: 1px;
}

/* ── External Links ── */

.studio-chatbot__external-links {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 24px;
  border-top: 1px solid #E5E7EB;
  background: #FFFFFF;
  flex-shrink: 0;
  overflow: hidden;
}

.studio-chatbot__external-links-label {
  display: inline-block;
  flex: 0 0 auto;
  font-size: 11px;
  color: #6E6E73;
  margin: 0;
  white-space: nowrap;
}

.studio-chatbot__external-links-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  align-items: center;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.studio-chatbot__external-links-buttons::-webkit-scrollbar {
  display: none;
}

.studio-chatbot__external-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex: 0 0 auto;
  padding: 4px 10px;
  border: 1px solid #6E6E73;
  border-radius: 14px;
  font-size: 12px;
  color: #6E6E73;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  line-height: 1.3;
}

@media (hover: hover) {
  .studio-chatbot__external-link:hover {
    background: #F5F5F7;
    color: #1D1D1F;
    border-color: #1D1D1F;
  }
}

.studio-chatbot__external-link:focus-visible {
  outline: 2px solid var(--studio-chatbot-accent);
  outline-offset: 1px;
}

.studio-chatbot__external-link svg {
  flex-shrink: 0;
}

/* ── Input Area ── */

.studio-chatbot__input-area {
  position: sticky;
  bottom: var(--studio-chatbot-keyboard-offset, 0px);
  z-index: 20;
  display: block;
  padding: 8px 16px calc(env(safe-area-inset-bottom) + 16px);
  border-top: 1px solid #E5E7EB;
  background: #FFFFFF;
  flex-shrink: 0;
  transition: bottom 220ms ease, padding-bottom 220ms ease;
}

.studio-chatbot__input-area--hidden {
  display: none;
}

.studio-chatbot__composer {
  max-width: var(--studio-chatbot-content-max-width);
  margin: 0 auto;
  position: relative;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: 0 4px 18px rgba(17, 24, 39, 0.08);
  display: block;
  overflow: hidden;
  min-height: 56px;
}

.studio-chatbot__input {
  position: absolute;
  inset: 0;
  border: none;
  border-radius: 16px;
  padding: 15px 58px 15px 16px;
  font-size: 16px;
  font-family: inherit;
  color: #1D1D1F;
  background: transparent;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  min-height: 56px;
  max-height: 56px;
  line-height: 1.4;
  resize: none;
  overflow-y: hidden;
  touch-action: manipulation;
  box-sizing: border-box;
  z-index: 1;
}

.studio-chatbot__input::placeholder {
  color: #6E6E73;
}

.studio-chatbot__input--single-line {
  white-space: nowrap;
  overflow-x: hidden;
}

.studio-chatbot__input:focus-visible {
  outline: none;
}

.studio-chatbot__composer-actions {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0;
  width: 44px;
  height: 44px;
  pointer-events: none;
  z-index: 2;
}

.studio-chatbot__send-btn {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  pointer-events: auto;
  border: none;
  background: var(--studio-chatbot-accent, #FF7000);
  color: #FFFFFF;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  pointer-events: auto;
  transition: background 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.studio-chatbot__send-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

@media (hover: hover) {
  .studio-chatbot__send-btn:hover:not(:disabled) {
    background: var(--studio-chatbot-accent-hover, #E66500);
    transform: translateY(-1px);
  }
}

.studio-chatbot__send-btn--stop {
  background: #111827;
}

@media (hover: hover) {
  .studio-chatbot__send-btn--stop:hover:not(:disabled) {
    background: #1F2937;
  }
}

.studio-chatbot__send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.studio-chatbot__send-btn:focus-visible {
  outline: 2px solid var(--studio-chatbot-accent, #FF7000);
  outline-offset: 2px;
}

/* ── Send Button Spinner ── */

.studio-chatbot__spinner {
  animation: studio-chatbot-spin 0.8s linear infinite;
}

@keyframes studio-chatbot-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ── Powered By Footer (embed only) ── */

.studio-chatbot__powered-by {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  background: #FAFAFA;
  border-top: 1px solid #E5E5E7;
  flex-shrink: 0;
}

.studio-chatbot__powered-by-link {
  font-size: 11px;
  color: #6E6E73;
  text-decoration: none;
  transition: color 0.15s ease;
}

@media (hover: hover) {
  .studio-chatbot__powered-by-link:hover {
    color: #1D1D1F;
  }
}

.studio-chatbot__jump-btn {
  position: absolute;
  left: 50%;
  bottom: calc(78px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid #E5E7EB;
  background: rgba(255, 255, 255, 0.95);
  color: #1D1D1F;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.12);
  cursor: pointer;
  z-index: 21;
  transition: opacity 180ms ease, transform 180ms ease;
}

.studio-chatbot__jump-btn--hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
}

/* ── JOYCE polish ── */

@property --joyce-glow-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.studio-chatbot[data-theme="injoy-blue"] {
  --joyce-ink: #102A3A;
  --joyce-copy: #425766;
  --joyce-muted: #748692;
  --joyce-line: #DCE6EC;
  --joyce-soft: #F2F7FA;
  --joyce-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__bubble,
.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__window {
  --joyce-glow-angle: 0deg;
  border: 1.5px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    conic-gradient(
      from var(--joyce-glow-angle),
      rgba(245, 158, 11, 0.76) 0%,
      rgba(244, 63, 94, 0.78) 18%,
      rgba(168, 85, 247, 0.82) 36%,
      rgba(59, 130, 246, 0.84) 55%,
      rgba(20, 184, 166, 0.78) 74%,
      rgba(132, 204, 22, 0.72) 88%,
      rgba(245, 158, 11, 0.76) 100%
    ) border-box;
  box-shadow:
    var(--joyce-depth-shadow),
    -10px -8px 28px rgba(244, 63, 94, 0.15),
    12px -5px 30px rgba(59, 130, 246, 0.16),
    10px 12px 30px rgba(20, 184, 166, 0.13),
    -8px 12px 28px rgba(245, 158, 11, 0.11);
  animation: joyce-soft-glow-turn 8s linear infinite;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__bubble {
  --joyce-depth-shadow: 0 10px 30px rgba(5, 25, 40, 0.16);
  animation: joyce-soft-glow-turn 8s linear infinite, joyce-soft-glow-breathe 5s ease-in-out infinite;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__bubble::after {
  display: none;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__bubble--hidden,
.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__overlay--hidden .studio-chatbot__window {
  animation-play-state: paused;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__overlay {
  background-color: rgba(7, 23, 34, 0.44);
  backdrop-filter: blur(12px) saturate(0.86);
  -webkit-backdrop-filter: blur(12px) saturate(0.86);
  box-shadow: inset 0 0 180px rgba(5, 25, 40, 0.18);
  isolation: isolate;
  transition: none;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__window {
  --joyce-depth-shadow: 0 32px 96px rgba(5, 25, 40, 0.28);
  border-radius: 22px;
  backface-visibility: hidden;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__overlay--closing .studio-chatbot__window {
  animation-play-state: paused;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__window--joyce-entering {
  animation-play-state: paused;
}

.studio-chatbot--animations-paused,
.studio-chatbot--animations-paused *,
.studio-chatbot--animations-paused *::before,
.studio-chatbot--animations-paused *::after {
  animation-play-state: paused !important;
}

@keyframes joyce-soft-glow-turn {
  to {
    --joyce-glow-angle: 360deg;
  }
}

@keyframes joyce-soft-glow-breathe {
  0%, 100% {
    box-shadow:
      var(--joyce-depth-shadow),
      -10px -8px 28px rgba(244, 63, 94, 0.12),
      12px -5px 30px rgba(59, 130, 246, 0.14),
      10px 12px 30px rgba(20, 184, 166, 0.1),
      -8px 12px 28px rgba(245, 158, 11, 0.09);
  }
  50% {
    box-shadow:
      var(--joyce-depth-shadow),
      -13px -10px 36px rgba(244, 63, 94, 0.2),
      15px -7px 40px rgba(59, 130, 246, 0.21),
      13px 15px 38px rgba(20, 184, 166, 0.17),
      -11px 15px 36px rgba(245, 158, 11, 0.15);
  }
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__header {
  min-height: 68px;
  padding: 12px 20px;
  border-bottom-color: rgba(0, 60, 101, 0.11);
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__window--joyce-entering .studio-chatbot__header-left {
  animation: joyce-header-enter 520ms var(--joyce-ease) 70ms both;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__window--joyce-entering .studio-chatbot__header-actions {
  animation: joyce-header-actions-enter 420ms var(--joyce-ease) 150ms both;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__header-left {
  gap: 12px;
  transition: gap 360ms var(--joyce-ease);
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__header-left--without-avatar {
  gap: 0;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__header-left--interactive {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 180ms var(--joyce-ease);
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__header-left--interactive:focus-visible {
  outline: none;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__header-left--interactive:active {
  transform: scale(0.97);
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__header-icon {
  position: relative;
  isolation: isolate;
  width: 40px;
  height: 40px;
  opacity: 1;
  transform: scale(1);
  transform-origin: left center;
  transition:
    width 360ms var(--joyce-ease),
    opacity 220ms ease-out,
    transform 360ms var(--joyce-ease);
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__header-icon--empty {
  width: 0;
  opacity: 0;
  transform: scale(0.72);
  pointer-events: none;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__window--joyce-entering .studio-chatbot__header-avatar {
  animation: joyce-avatar-shell-enter 620ms var(--joyce-ease) 90ms both;
}

@media (hover: hover) {
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__header-left--interactive:hover .studio-chatbot__header-icon {
    transform: translateY(-1px) rotate(-2deg) scale(1.06);
  }
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__header-left--interactive:focus-visible .studio-chatbot__header-icon {
  box-shadow: 0 0 0 2px rgba(0, 86, 142, 0.32);
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__header-avatar {
  position: relative;
  z-index: 2;
  padding: 1px;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__presence-wave {
  position: relative;
  isolation: isolate;
  overflow: visible;
  width: min(420px, 100%);
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2px auto 32px;
  padding: 8px 0;
  opacity: 0.66;
  border: 0;
  background: transparent;
  color: inherit;
  appearance: none;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  filter: drop-shadow(0 5px 12px rgba(99, 102, 241, 0.2));
  transition: opacity 240ms ease, filter 240ms ease;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__presence-wave:focus-visible {
  outline: 2px solid rgba(0, 86, 142, 0.42);
  outline-offset: 4px;
  border-radius: 999px;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__presence-wave[data-joyce-cue="listening"] {
  animation: joyce-wave-cue-listening 720ms var(--joyce-ease) both;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__presence-wave[data-joyce-cue="thinking"] {
  animation: joyce-wave-cue-thinking 880ms var(--joyce-ease) both;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__presence-wave[data-joyce-cue="speaking"] {
  animation: joyce-wave-cue-speaking 680ms var(--joyce-ease) both;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__presence-wave::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 18% 3%;
  border-radius: 50%;
  background: linear-gradient(90deg, #F59E0B, #F43F5E 22%, #A855F7 42%, #3B82F6 64%, #14B8A6 82%, #84CC16);
  opacity: 0.2;
  filter: blur(24px);
  transform: translate3d(var(--joyce-wave-pointer-x, 0), var(--joyce-wave-pointer-y, 0), 0) scale3d(0.88, 0.7, 1);
  animation: joyce-presence-aura 3.8s ease-in-out infinite;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__presence-wave-bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2.5px, 1vw, 4px);
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__presence-wave i {
  flex: 0 0 4px;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    hsl(var(--joyce-wave-hue) 90% 72%),
    hsl(var(--joyce-wave-hue) 84% 52%)
  );
  box-shadow: 0 0 7px hsl(var(--joyce-wave-hue) 88% 60% / 0.35);
  transform: scaleY(calc(var(--joyce-wave-rest, 0.36) + (var(--joyce-wave-hover, 0) * 0.58)));
  transform-origin: center;
  animation: joyce-presence-wave calc(3.1s + var(--joyce-wave-variance, 0ms)) cubic-bezier(0.45, 0, 0.55, 1) var(--joyce-wave-delay) infinite;
}

.studio-chatbot[data-theme="injoy-blue"][data-joyce-presence="listening"] .studio-chatbot__presence-wave,
.studio-chatbot[data-theme="injoy-blue"].studio-chatbot--input-focus .studio-chatbot__presence-wave {
  opacity: 0.88;
  filter: drop-shadow(0 7px 17px rgba(99, 102, 241, 0.3));
}

.studio-chatbot[data-theme="injoy-blue"][data-joyce-presence="listening"] .studio-chatbot__presence-wave i,
.studio-chatbot[data-theme="injoy-blue"].studio-chatbot--input-focus .studio-chatbot__presence-wave i {
  animation-name: joyce-listening-wave;
  animation-duration: calc(2.1s + var(--joyce-wave-variance, 0ms));
}

.studio-chatbot[data-theme="injoy-blue"][data-joyce-presence="thinking"] .studio-chatbot__presence-wave {
  opacity: 0.88;
  filter: drop-shadow(0 7px 17px rgba(168, 85, 247, 0.34));
}

.studio-chatbot[data-theme="injoy-blue"][data-joyce-presence="thinking"] .studio-chatbot__presence-wave i {
  animation-name: joyce-thinking-wave;
  animation-duration: calc(2.45s + var(--joyce-wave-variance, 0ms));
}

.studio-chatbot[data-theme="injoy-blue"][data-joyce-presence="speaking"] .studio-chatbot__presence-wave {
  opacity: 0.96;
  filter: drop-shadow(0 8px 20px rgba(59, 130, 246, 0.38));
}

.studio-chatbot[data-theme="injoy-blue"][data-joyce-presence="speaking"] .studio-chatbot__presence-wave i {
  animation-name: joyce-speaking-wave;
  animation-duration: 1.55s;
  animation-delay: 0ms;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__window--joyce-entering .studio-chatbot__presence-wave {
  animation: joyce-presence-reveal 680ms var(--joyce-ease) 180ms both;
}

@keyframes joyce-presence-wave {
  0%, 14%, 45%, 72%, 100% {
    transform: scaleY(calc(var(--joyce-wave-rest, 0.36) + (var(--joyce-wave-hover, 0) * 0.58)));
    opacity: 0.58;
  }
  24%, 84% {
    transform: scaleY(calc(var(--joyce-wave-mid, 0.32) + (var(--joyce-wave-hover, 0) * 0.38)));
    opacity: 0.72;
  }
  34% {
    transform: scaleY(calc(var(--joyce-wave-peak, 0.7) + (var(--joyce-wave-hover, 0) * 0.36)));
    opacity: 1;
  }
  58% {
    transform: scaleY(calc(var(--joyce-wave-echo, 0.56) + (var(--joyce-wave-hover, 0) * 0.42)));
    opacity: 0.9;
  }
}

@keyframes joyce-listening-wave {
  0%, 28%, 100% {
    transform: scaleY(calc(var(--joyce-wave-rest, 0.36) + (var(--joyce-wave-hover, 0) * 0.52)));
    opacity: 0.6;
  }
  48%, 78% {
    transform: scaleY(calc(var(--joyce-wave-mid, 0.32) + (var(--joyce-wave-hover, 0) * 0.4)));
    opacity: 0.78;
  }
  62% {
    transform: scaleY(calc(var(--joyce-wave-peak, 0.7) + (var(--joyce-wave-hover, 0) * 0.3)));
    opacity: 0.96;
  }
}

@keyframes joyce-thinking-wave {
  0%, 100% {
    transform: scaleY(calc(var(--joyce-wave-rest, 0.36) + (var(--joyce-wave-hover, 0) * 0.5)));
    opacity: 0.56;
  }
  20%, 78% {
    transform: scaleY(calc(var(--joyce-wave-mid, 0.32) + (var(--joyce-wave-hover, 0) * 0.42)));
    opacity: 0.72;
  }
  44% {
    transform: scaleY(calc(var(--joyce-wave-peak, 0.7) + (var(--joyce-wave-hover, 0) * 0.32)));
    opacity: 1;
  }
  64% {
    transform: scaleY(calc(var(--joyce-wave-echo, 0.56) + (var(--joyce-wave-hover, 0) * 0.38)));
    opacity: 0.84;
  }
}

@keyframes joyce-speaking-wave {
  0%, 12%, 36%, 58%, 86%, 100% {
    transform: scaleY(calc(var(--joyce-wave-rest, 0.36) + (var(--joyce-wave-hover, 0) * 0.56)));
    opacity: 0.58;
  }
  17% {
    transform: scaleY(calc(var(--joyce-speech-a, 0.58) + (var(--joyce-wave-hover, 0) * 0.3)));
    opacity: 1;
  }
  23% {
    transform: scaleY(calc(var(--joyce-speech-b, 0.44) + (var(--joyce-wave-hover, 0) * 0.34)));
    opacity: 0.86;
  }
  30% {
    transform: scaleY(calc(var(--joyce-speech-c, 0.62) + (var(--joyce-wave-hover, 0) * 0.28)));
    opacity: 0.96;
  }
  43% {
    transform: scaleY(calc(var(--joyce-speech-d, 0.72) + (var(--joyce-wave-hover, 0) * 0.28)));
    opacity: 1;
  }
  49% {
    transform: scaleY(calc(var(--joyce-speech-a, 0.58) + (var(--joyce-wave-hover, 0) * 0.34)));
    opacity: 0.84;
  }
  54% {
    transform: scaleY(calc(var(--joyce-speech-c, 0.62) + (var(--joyce-wave-hover, 0) * 0.3)));
    opacity: 0.94;
  }
  68% {
    transform: scaleY(calc(var(--joyce-speech-b, 0.44) + (var(--joyce-wave-hover, 0) * 0.34)));
    opacity: 0.88;
  }
  74% {
    transform: scaleY(calc(var(--joyce-speech-d, 0.72) + (var(--joyce-wave-hover, 0) * 0.28)));
    opacity: 1;
  }
  80% {
    transform: scaleY(calc(var(--joyce-speech-a, 0.58) + (var(--joyce-wave-hover, 0) * 0.36)));
    opacity: 0.82;
  }
}

@keyframes joyce-wave-cue-listening {
  0%, 100% { transform: scale3d(1, 1, 1); }
  38% { transform: scale3d(1.055, 0.9, 1); }
  68% { transform: scale3d(0.985, 1.035, 1); }
}

@keyframes joyce-wave-cue-thinking {
  0%, 100% { transform: translate3d(0, 0, 0) scale3d(1, 1, 1); }
  32% { transform: translate3d(-5px, -3px, 0) scale3d(0.96, 1.04, 1); }
  62% { transform: translate3d(5px, 2px, 0) scale3d(1.035, 0.97, 1); }
}

@keyframes joyce-wave-cue-speaking {
  0%, 100% { transform: scale3d(1, 1, 1); }
  24% { transform: scale3d(1.075, 1.08, 1); }
  48% { transform: scale3d(0.975, 0.92, 1); }
  72% { transform: scale3d(1.035, 1.04, 1); }
}

@keyframes joyce-presence-aura {
  0%, 100% {
    opacity: 0.16;
    transform: translate3d(var(--joyce-wave-pointer-x, 0), var(--joyce-wave-pointer-y, 0), 0) scale3d(0.88, 0.7, 1);
  }
  50% {
    opacity: 0.3;
    transform: translate3d(var(--joyce-wave-pointer-x, 0), var(--joyce-wave-pointer-y, 0), 0) scale3d(1, 0.88, 1);
  }
}

@keyframes joyce-presence-reveal {
  0% {
    opacity: 0.01;
    transform: scaleX(0.7) translateY(8px);
    filter: blur(8px);
  }
  100% {
    opacity: 0.76;
    transform: scaleX(1) translateY(0);
    filter: blur(0) drop-shadow(0 6px 15px rgba(99, 102, 241, 0.28));
  }
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__header-title {
  color: var(--joyce-ink);
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__header-btn {
  color: var(--studio-chatbot-accent);
  transition: background-color 180ms ease, color 180ms ease, transform 260ms var(--joyce-ease);
}

@media (hover: hover) {
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__header-btn:hover {
    background: var(--joyce-soft);
    transform: translateY(-1px) scale(1.04);
  }
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__header-btn:active {
  transform: scale(0.92);
}

@media (hover: hover) {
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__header-btn--new-session:hover {
    transform: rotate(-18deg) scale(1.04);
  }
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__header-btn--new-session.studio-chatbot__header-btn--spinning {
  background: var(--joyce-soft);
  color: var(--studio-chatbot-accent);
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__header-btn--new-session.studio-chatbot__header-btn--spinning svg {
  transform-origin: center;
  animation: joyce-new-session-spin 440ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes joyce-new-session-spin {
  0% {
    transform: rotate(0deg) scale(1);
    filter: drop-shadow(0 0 0 rgba(59, 130, 246, 0));
  }
  42% {
    transform: rotate(210deg) scale(0.88);
    filter: drop-shadow(0 3px 6px rgba(59, 130, 246, 0.28));
  }
  76% {
    transform: rotate(338deg) scale(1.08);
    filter: drop-shadow(0 2px 5px rgba(20, 184, 166, 0.24));
  }
  100% {
    transform: rotate(360deg) scale(1);
    filter: drop-shadow(0 0 0 rgba(20, 184, 166, 0));
  }
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__messages {
  gap: 20px;
  padding: 36px 28px calc(28px + var(--studio-chatbot-keyboard-offset, 0px));
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 60, 101, 0.2) transparent;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__messages::-webkit-scrollbar {
  width: 5px;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__messages::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(0, 60, 101, 0.2);
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message {
  gap: 6px;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message:not([data-message-variant="welcome"]) {
  animation: joyce-message-enter 360ms var(--joyce-ease) both;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message--user:not([data-message-variant="welcome"]) {
  transform-origin: right center;
  backface-visibility: hidden;
  animation-name: joyce-user-message-enter;
  animation-duration: 500ms;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message[data-message-variant="welcome"] {
  background: transparent;
  animation: joyce-welcome-enter 460ms var(--joyce-ease) 150ms both;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message[data-message-variant="welcome"] .studio-chatbot__message-bubble--bot {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 4px 0 24px;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message[data-message-variant="welcome"] .studio-chatbot__message-text {
  color: var(--joyce-copy);
  line-height: 1.55;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message[data-message-variant="welcome"] .studio-chatbot__message-text strong {
  margin-bottom: 14px;
  color: var(--joyce-ink);
  font-size: clamp(24px, 3.4vw, 27px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__welcome-message-title {
  animation: joyce-title-reveal 520ms var(--joyce-ease) 220ms both;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__welcome-message-description {
  display: block;
  animation: joyce-description-reveal 500ms var(--joyce-ease) 320ms both;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__welcome-message-break {
  display: none;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message[data-message-variant="welcome"] .studio-chatbot__message-meta-row {
  display: none;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message[data-handoff-message="true"] .studio-chatbot__message-meta-row {
  display: flex;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message-bubble--user {
  padding: 11px 15px;
  border-radius: 18px 18px 6px;
  background: var(--studio-chatbot-accent);
  box-shadow: 0 8px 20px rgba(0, 60, 101, 0.16);
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message--bot:not([data-message-variant="welcome"]) .studio-chatbot__message-text {
  color: #263D4C;
  overflow-wrap: break-word;
  word-break: normal;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__stream-fragment {
  animation: joyce-stream-fragment-wave 240ms cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: filter, opacity;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__followup-pills {
  margin-top: 18px;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__followup-scroll {
  gap: 10px;
  padding: 16px 32px 32px 24px;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message[data-message-variant="welcome"] .studio-chatbot__followup-pills {
  margin-top: 30px;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message[data-message-variant="welcome"] .studio-chatbot__followup-scroll {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  overflow: visible;
  margin: 0;
  padding: 0;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message[data-message-variant="welcome"] .studio-chatbot__followup-pill {
  justify-content: flex-start;
  width: 100%;
  min-height: 54px;
  max-width: 100%;
  min-width: 0;
  padding: 15px clamp(11px, 4vw, 18px);
  border-radius: 14px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: clamp(11px, 3.75vw, 16px);
  letter-spacing: -0.012em;
  animation: joyce-chip-enter 440ms var(--joyce-ease) 450ms both;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message[data-message-variant="welcome"] .studio-chatbot__followup-pill:nth-child(2) {
  animation-delay: 515ms;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message[data-message-variant="welcome"] .studio-chatbot__followup-pill:nth-child(3) {
  animation-delay: 580ms;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message:not([data-message-variant="welcome"]) .studio-chatbot__followup-pill {
  animation: joyce-chip-enter 340ms var(--joyce-ease) both;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message:not([data-message-variant="welcome"]) .studio-chatbot__followup-pill:nth-child(2) {
  animation-delay: 45ms;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message:not([data-message-variant="welcome"]) .studio-chatbot__followup-pill:nth-child(3) {
  animation-delay: 90ms;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__followup-pill {
  min-height: 42px;
  padding: 10px 14px;
  border-color: var(--joyce-line);
  background: #FFFFFF;
  color: #405665;
  font-weight: 600;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease, transform 260ms var(--joyce-ease);
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message[data-message-variant="welcome"] .studio-chatbot__followup-pill:first-child {
  border-color: rgba(0, 60, 101, 0.22);
  background: var(--joyce-soft);
  color: var(--studio-chatbot-accent);
}

@media (hover: hover) {
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__followup-pill:hover {
    border-color: rgba(0, 60, 101, 0.34);
    background: var(--joyce-soft);
    color: var(--studio-chatbot-accent);
    transform: translateY(-2px);
  }
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__followup-pill:active {
  transform: translateY(0) scale(0.97);
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__followup-pill--action {
  min-height: 46px;
  padding: 11px 16px;
  border-color: var(--studio-chatbot-accent);
  background: var(--studio-chatbot-accent);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0, 60, 101, 0.24);
}

@media (hover: hover) {
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__followup-pill--action:hover,
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__followup-pill--action:focus-visible {
    border-color: var(--studio-chatbot-accent-hover);
    background: var(--studio-chatbot-accent-hover);
    color: #FFFFFF;
    box-shadow: 0 10px 24px rgba(0, 60, 101, 0.3);
  }
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__followup-pill--action:active {
  box-shadow: 0 4px 12px rgba(0, 60, 101, 0.2);
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message-meta {
  color: var(--joyce-muted);
  font-variant-numeric: tabular-nums;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__typing {
  width: fit-content !important;
  min-width: 54px;
  padding: 10px 14px !important;
  border-radius: 999px;
  background: var(--joyce-soft);
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__typing-dot {
  width: 7px;
  height: 7px;
  background: var(--studio-chatbot-accent);
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__input-area {
  padding: 18px 20px calc(env(safe-area-inset-bottom) + 22px);
  border-top-color: rgba(0, 60, 101, 0.1);
  background: linear-gradient(to top, #FFFFFF 72%, rgba(247, 251, 253, 0.98) 88%, rgba(255, 255, 255, 0.78));
  box-shadow: 0 -16px 38px rgba(5, 25, 40, 0.045);
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__window--joyce-entering .studio-chatbot__input-area {
  animation: joyce-dock-enter 520ms var(--joyce-ease) 260ms both;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__composer {
  min-height: 66px;
  border: 1.5px solid rgba(0, 60, 101, 0.22);
  border-radius: 18px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F5F9FB 100%);
  box-shadow: 0 3px 0 rgba(0, 60, 101, 0.045);
  transition: border-color 200ms ease, background-color 200ms ease, box-shadow 260ms var(--joyce-ease), transform 260ms var(--joyce-ease);
}

@media (hover: hover) {
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__composer:hover {
    border-color: rgba(0, 60, 101, 0.42);
  }
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__composer:focus-within {
  border-color: var(--studio-chatbot-accent);
  background: #FFFFFF;
  box-shadow: 0 12px 30px rgba(0, 60, 101, 0.13), 0 0 0 3px rgba(0, 86, 142, 0.12);
  transform: translateY(-2px) scale(1.004);
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__input {
  min-height: 66px;
  max-height: 66px;
  padding: 21px 70px 21px 20px;
  font-size: 17px;
  line-height: 24px;
  color: var(--joyce-ink);
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__input::placeholder {
  color: #536C7A;
  font-weight: 500;
}

/* The JOYCE theme resets the input padding; keep room for the welcome avatar
   and keep long example prompts on one line. */
.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__composer--with-avatar .studio-chatbot__input {
  padding-left: 68px;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__composer--with-avatar .studio-chatbot__input::placeholder {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__composer-actions {
  right: 9px;
  width: 48px;
  height: 48px;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__send-btn {
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  background: var(--studio-chatbot-accent);
  box-shadow: 0 7px 18px rgba(0, 60, 101, 0.22);
  transition: background-color 180ms ease, color 180ms ease, box-shadow 220ms ease, opacity 180ms ease, transform 280ms var(--joyce-ease);
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__send-btn:disabled {
  background: #E1EBF0;
  color: #668493;
  box-shadow: inset 0 0 0 1px rgba(0, 60, 101, 0.06);
  opacity: 1;
}

@media (hover: hover) {
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__send-btn:hover:not(:disabled) {
    background: var(--studio-chatbot-accent-hover);
    box-shadow: 0 9px 22px rgba(0, 60, 101, 0.28);
    transform: translateY(-2px) scale(1.04);
  }
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__send-btn:active:not(:disabled) {
  transform: scale(0.92);
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__followup-fade--start {
  background: linear-gradient(to right, #FFFFFF 24%, rgba(255, 255, 255, 0.86) 58%, transparent);
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__followup-fade--end {
  background: linear-gradient(to left, #FFFFFF 24%, rgba(255, 255, 255, 0.86) 58%, transparent);
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message--streaming > .studio-chatbot__message-meta-row--assistant,
.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message--response-ready:not(.studio-chatbot__message--completion-visible) > .studio-chatbot__message-meta-row--assistant,
.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message--streaming .studio-chatbot__completion-item,
.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message--response-ready:not(.studio-chatbot__message--completion-visible) .studio-chatbot__completion-item {
  visibility: hidden;
  opacity: 0;
  transform: translate3d(0, 12px, 0) scale(0.985);
  filter: blur(8px);
  pointer-events: none;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message--completion-visible > .studio-chatbot__message-meta-row--assistant,
.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message--completion-visible .studio-chatbot__completion-item,
.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message:not(.studio-chatbot__message--streaming):not(.studio-chatbot__message--response-ready) .studio-chatbot__completion-item {
  visibility: visible;
  animation: joyce-completion-enter 500ms var(--joyce-ease) both;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message--completion-visible .studio-chatbot__completion-item {
  animation-delay: 40ms;
}

.studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message--completion-visible > .studio-chatbot__message-meta-row--assistant {
  animation-delay: 110ms;
}

@keyframes joyce-completion-enter {
  0% {
    opacity: 0;
    transform: translate3d(0, 12px, 0) scale(0.985);
    filter: blur(8px);
  }
  64% {
    opacity: 0.96;
    transform: translate3d(0, -1px, 0) scale(1.003);
    filter: blur(0.6px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes joyce-welcome-enter {
  0% {
    opacity: 0.01;
    transform: translateY(10px);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes joyce-chip-enter {
  0% {
    opacity: 0.01;
    transform: translateY(10px) scale(0.92);
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes joyce-message-enter {
  0% {
    opacity: 0.01;
    transform: translateY(10px) scale(0.985);
    filter: blur(4px);
    clip-path: inset(0 0 18% 0 round 14px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
    clip-path: none;
  }
}

@keyframes joyce-stream-fragment-wave {
  0% {
    opacity: 0.08;
    filter: blur(5px);
  }
  58% {
    opacity: 0.92;
    filter: blur(0.7px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes joyce-user-message-enter {
  0% {
    opacity: 0;
    transform: translate3d(52px, 0, 0) scale(0.965);
    filter: blur(9px);
  }
  68% {
    opacity: 1;
    transform: translate3d(-2px, 0, 0) scale(1.004);
    filter: blur(0.35px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes joyce-header-enter {
  0% {
    opacity: 0.01;
    transform: translateX(-12px);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

@keyframes joyce-header-actions-enter {
  0% {
    opacity: 0.01;
    transform: translateX(10px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes joyce-avatar-shell-enter {
  0% {
    opacity: 0.01;
    transform: scale(0.72) rotate(-10deg);
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
    filter: blur(0);
  }
}

@keyframes joyce-title-reveal {
  0% {
    opacity: 0.01;
    transform: translateY(12px);
    filter: blur(6px);
    clip-path: inset(0 0 100% 0);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    clip-path: inset(0 0 0 0);
  }
}

@keyframes joyce-description-reveal {
  0% {
    opacity: 0.01;
    transform: translateY(8px);
    filter: blur(4px);
    clip-path: inset(0 0 100% 0);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    clip-path: inset(0 0 0 0);
  }
}

@keyframes joyce-dock-enter {
  0% {
    opacity: 0.01;
    transform: translateY(18px);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* ── Body scroll lock (mobile overlay) ── */

.studio-chatbot-body-locked {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

.chat-shell__messages {
  transition: padding-bottom 260ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.gym-finder-shell,
.gym-finder-shell .chat-shell__messages,
.gym-finder-shell [data-message-wrapper="true"] {
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  overflow-x: clip;
}

.gym-finder-shell .chat-shell__message-list {
  min-width: 0;
  overflow-x: hidden;
  overflow-x: clip;
}

.gym-finder-shell [data-message-bubble="true"],
.gym-finder-shell [data-message-text="true"] {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.chat-shell__welcome-collapse {
  transition: max-height 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1), margin 320ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: max-height, opacity, transform, margin;
}

.chat-shell__welcome-frame {
  transition: max-height 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease, background-color 320ms cubic-bezier(0.22, 1, 0.36, 1), border-color 320ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 320ms cubic-bezier(0.22, 1, 0.36, 1), padding 320ms cubic-bezier(0.22, 1, 0.36, 1), margin 320ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: max-height, opacity, background-color, border-color, box-shadow, padding, margin;
}

.chat-shell__welcome-home {
  transition: width 320ms cubic-bezier(0.22, 1, 0.36, 1), bottom 320ms cubic-bezier(0.22, 1, 0.36, 1), transform 320ms cubic-bezier(0.22, 1, 0.36, 1), margin 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease;
  will-change: width, bottom, transform, margin, opacity;
}

.chat-shell__jump {
  transition: opacity 220ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.article-chat-modal__greeting--transition {
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.article-chat-modal__greeting--exit {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.article-chat-modal__messages--transition {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.article-chat-modal__messages--transition.article-chat-modal__messages--visible {
  opacity: 1;
  transform: translateY(0);
}

.gym-finder__greeting--transition-enter {
  opacity: 0;
  transform: translateY(14px) scale(0.992);
  pointer-events: none;
}

.gym-finder__greeting--transition-enter.gym-finder__greeting--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 220ms ease, transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: auto;
}

.gym-finder__messages--transition-exit {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.gym-finder__messages--transition-exit.gym-finder__messages--hidden {
  opacity: 0;
  transform: translateY(-10px) scale(0.996);
  transition: opacity 180ms ease, transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.chat-shell__greeting-reset-enter {
  opacity: 0;
  transform: translateY(14px) scale(0.992);
  pointer-events: none;
}

.chat-shell__greeting-reset-enter.chat-shell__greeting-reset-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 220ms ease, transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.chat-shell__messages-reset-exit {
  opacity: 1;
  transform: translateY(0);
}

.chat-shell__messages-reset-exit.chat-shell__messages-reset-hidden {
  opacity: 0;
  transform: translateY(-10px) scale(0.996);
  pointer-events: none;
  transition: opacity 180ms ease, transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.studio-chatbot__messages--reset-transition {
  transition: opacity 180ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.studio-chatbot__messages--reset-out {
  opacity: 0;
  transform: translateY(-10px) scale(0.996);
  pointer-events: none;
}

.studio-chatbot__messages--reset-in {
  opacity: 0;
  transform: translateY(14px) scale(0.992);
  pointer-events: none;
}

.gym-finder__sales-banner,
.studio-chatbot__external-links {
  transition: opacity 220ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 1023px) {
  .chat-shell--input-focus.chat-shell--keyboard-open .chat-shell__messages {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px);
  }

  .chat-shell--compact.chat-shell--input-focus.chat-shell--keyboard-open .chat-shell__jump {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 8px);
  }

  .chat-shell--compact.chat-shell--input-focus.chat-shell--keyboard-open .gym-finder__sales-banner,
  .chat-shell--compact.chat-shell--input-focus.chat-shell--keyboard-open .studio-chatbot__external-links {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
  }

  .studio-chatbot__messages {
    transition: padding-bottom 220ms ease, opacity 220ms ease, transform 220ms ease;
  }

  .studio-chatbot--input-focus.studio-chatbot--keyboard-open .studio-chatbot__jump-btn {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 8px);
  }
}

/* ── Mobile (< 640px) ── */

@media (max-width: 639px) {
  .article-chat-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .article-chat-modal {
    width: 100vw;
    --studio-chatbot-viewport-height: 84dvh;
    height: var(--studio-chatbot-viewport-height);
    max-height: var(--studio-chatbot-viewport-height);
    border-radius: 24px 24px 0 0;
  }

  .studio-chatbot__bubble {
    bottom: calc(16px + env(safe-area-inset-bottom));
    left: 16px;
    right: 16px;
    width: calc(100vw - 32px);
    max-width: none;
    min-height: 56px;
  }

  .studio-chatbot__overlay {
    align-items: flex-end;
    padding: 0;
  }

  .studio-chatbot__window {
    position: relative;
    width: 100vw;
    --studio-chatbot-viewport-height: 84dvh;
    height: var(--studio-chatbot-viewport-height);
    max-height: var(--studio-chatbot-viewport-height);
    border-radius: 24px 24px 0 0;
  }

  .studio-chatbot[data-source="embed"] .studio-chatbot__window {
    width: 100vw;
    --studio-chatbot-viewport-height: 84dvh;
    height: var(--studio-chatbot-viewport-height);
    max-height: var(--studio-chatbot-viewport-height);
    border-radius: 24px 24px 0 0;
  }

  .studio-chatbot[data-source="embed"] .studio-chatbot__sheet-handle,
  .studio-chatbot[data-source="modal"] .studio-chatbot__sheet-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 6px;
    padding-bottom: 2px;
    background: #FFFFFF;
    flex-shrink: 0;
  }

  .studio-chatbot[data-source="embed"] .studio-chatbot__sheet-handle::before,
  .studio-chatbot[data-source="modal"] .studio-chatbot__sheet-handle::before {
    content: "";
    width: 48px;
    height: 4px;
    border-radius: 999px;
    background: #D1D5DB;
  }

  .studio-chatbot__messages {
    padding: 28px 20px calc(24px + var(--studio-chatbot-keyboard-offset));
    flex: 1;
    gap: 16px;
  }

  .studio-chatbot__stream-dock {
    gap: 14px;
  }

  .studio-chatbot__messages--welcome {
    padding-top: 20px;
    padding-bottom: calc(24px + var(--studio-chatbot-keyboard-offset, 0px));
  }

  .studio-chatbot__header {
    min-height: 64px;
    padding: 9px 8px 9px 16px;
  }

  .studio-chatbot__header-left {
    gap: 10px;
  }

  .studio-chatbot__header-icon {
    width: 38px;
    height: 38px;
  }

  .studio-chatbot__header-actions {
    gap: 0;
  }

  .studio-chatbot__header-btn {
    width: 44px;
    height: 44px;
  }

  .studio-chatbot--keyboard-open .studio-chatbot__overlay {
    background-color: rgba(17, 24, 39, 0.62);
  }

  .studio-chatbot__welcome-panel {
    padding: 4px;
    transition: background-color 320ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 320ms cubic-bezier(0.22, 1, 0.36, 1), padding 320ms cubic-bezier(0.22, 1, 0.36, 1), transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .studio-chatbot__welcome-title {
    font-size: clamp(2.15rem, 10.5vw, 2.5rem);
    line-height: 1.04;
  }

  .studio-chatbot__welcome-avatar {
    width: 76px;
    height: 76px;
  }

  .studio-chatbot__welcome-avatar--idle {
    right: 16px;
    top: 18px;
  }

  .studio-chatbot[data-source="embed"] .studio-chatbot__welcome-panel--with-avatar .studio-chatbot__welcome-eyebrow,
  .studio-chatbot[data-source="embed"] .studio-chatbot__welcome-panel--with-avatar .studio-chatbot__welcome-title,
  .studio-chatbot[data-source="embed"] .studio-chatbot__welcome-panel--with-avatar .studio-chatbot__welcome-text {
    padding-right: 126px;
  }

  .studio-chatbot__welcome-text {
    margin-top: 10px;
    font-size: 16px;
    line-height: 1.45;
  }

  .studio-chatbot__welcome-input {
    margin-top: 20px;
  }

  .chat-shell__welcome-cta-shell {
    display: block;
    width: 100%;
    max-width: none;
  }

  .chat-shell__welcome-cta-shell .studio-chatbot__welcome-booking-cta {
    width: 100%;
    min-width: 100%;
    min-height: 48px;
  }

  .studio-chatbot__welcome-quickstart {
    margin: 20px 0 10px;
    font-size: 14px;
  }

  .studio-chatbot__welcome-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .studio-chatbot__welcome-question {
    font-size: 14px;
    min-height: 44px;
    padding: 10px 14px;
  }

  .studio-chatbot__input-area {
    padding: 18px 16px calc(env(safe-area-inset-bottom) + 16px);
    border-top: 0;
    background: linear-gradient(to top, #FFFFFF 78%, rgba(255, 255, 255, 0));
  }

  .studio-chatbot__composer {
    min-height: 56px;
    border-radius: 20px;
    box-shadow: 0 8px 28px rgba(17, 24, 39, 0.12);
  }

  .studio-chatbot__input {
    font-size: 16px;
    min-height: 56px;
    max-height: 56px;
  }

  .studio-chatbot__composer--with-avatar {
    min-height: 60px;
  }

  .studio-chatbot__composer--with-avatar .studio-chatbot__input {
    min-height: 56px;
    max-height: 56px;
    padding-top: 17px;
    padding-bottom: 17px;
    padding-left: 60px;
    padding-right: 68px;
    font-size: 15px;
    line-height: 22px;
  }

  .studio-chatbot__composer-avatar {
    left: 12px;
    width: 44px;
    height: 44px;
  }

  .studio-chatbot__message-body--assistant {
    gap: 12px;
  }

  .studio-chatbot__message-avatar {
    width: 72px;
    height: 72px;
  }

  .studio-chatbot__message-avatar--inline {
    display: none;
  }

  .studio-chatbot__message--bot[data-avatar-placement="inline"],
  .studio-chatbot__message--bot[data-avatar-placement="inline"] .studio-chatbot__message-bubble {
    width: 100%;
    max-width: 100%;
  }

  .studio-chatbot__message--bot[data-avatar-placement="inline"] .studio-chatbot__message-bubble {
    padding: 0;
  }

  .studio-chatbot__message-bubble--user {
    max-width: 88%;
    padding: 10px 14px;
    border-radius: 18px 18px 6px 18px;
  }

  .studio-chatbot__message-text {
    font-size: 16px;
    line-height: 1.5;
  }

  .studio-chatbot__message-meta-row--assistant {
    --studio-chatbot-meta-control-height: 36px;
    min-height: 36px;
    gap: 4px;
  }

  .studio-chatbot__message-copy {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .studio-chatbot__answer-feedback {
    gap: 2px;
    margin-left: auto;
  }

  .studio-chatbot__feedback-reason-picker {
    position: relative;
    inset: auto;
    flex: 0 0 100%;
    width: 100%;
    margin: 2px 0 24px;
  }

  .studio-chatbot__message-meta-row--assistant:has(> .studio-chatbot__answer-feedback--choosing-reason) {
    flex-wrap: wrap;
  }

  .studio-chatbot__feedback-reason-options {
    grid-template-columns: minmax(0, 1fr);
  }

  .studio-chatbot__answer-feedback-prompt,
  .studio-chatbot__answer-feedback-label {
    display: none;
  }

  .studio-chatbot__answer-feedback button {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 17px;
  }

  @media (hover: hover) {
    .studio-chatbot__answer-feedback button:hover,
    .studio-chatbot__answer-feedback button:focus-visible {
      background: #F5F5F7;
    }
  }

  .studio-chatbot__message-inline-body {
    display: block;
  }

  .studio-chatbot__message-inline-content {
    max-width: none;
    padding-left: 0;
    padding-top: 0;
  }

  .studio-chatbot__message--bot[data-has-avatar="true"] .studio-chatbot__message-meta-row--assistant,
  .studio-chatbot__message--error[data-has-avatar="true"] .studio-chatbot__message-meta-row--assistant {
    padding-left: 0;
  }

  .studio-chatbot__message--bot[data-avatar-placement="inline"] .studio-chatbot__message-bubble--bot > .studio-chatbot__followup-pills,
  .studio-chatbot__message--error[data-avatar-placement="inline"] .studio-chatbot__message-bubble--bot > .studio-chatbot__followup-pills {
    width: 100%;
    margin-left: 0;
  }

  .studio-chatbot__welcome-panel > * {
    transition: max-height 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1), margin 320ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__messages {
    gap: 18px;
    padding: 34px 24px calc(28px + var(--studio-chatbot-keyboard-offset, 0px));
  }

  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__header {
    padding: 9px 12px 9px 16px;
  }

  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message[data-message-variant="welcome"] .studio-chatbot__message-text strong {
    font-size: clamp(24px, 6.2vw, 27px);
  }

  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__input-area {
    padding: 12px 16px calc(env(safe-area-inset-bottom) + 16px);
  }
}

@media (max-height: 620px) {
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__messages {
    padding-top: 8px;
  }

  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__presence-wave {
    display: none;
  }

  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message[data-message-variant="welcome"] .studio-chatbot__message-text strong {
    margin-bottom: 4px;
    font-size: 20px;
  }

  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message[data-message-variant="welcome"] .studio-chatbot__message-text {
    font-size: 14px;
    line-height: 1.35;
  }

  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message[data-message-variant="welcome"] .studio-chatbot__followup-pills {
    margin-top: 8px;
  }

  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message[data-message-variant="welcome"] .studio-chatbot__followup-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    width: calc(100% + 24px);
    margin: -8px 0 -8px -24px;
    padding: 16px 28px 32px 24px;
  }

  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message[data-message-variant="welcome"] .studio-chatbot__followup-pill {
    width: auto;
    min-width: max-content;
    min-height: 44px;
    padding: 10px 14px;
  }
}

@media (min-width: 640px) and (max-width: 767px) {
  .studio-chatbot__messages {
    padding-left: 24px;
    padding-right: 24px;
    gap: 12px;
  }

  .studio-chatbot__stream-dock {
    gap: 12px;
  }

  .studio-chatbot__input-area {
    padding: 8px 24px calc(env(safe-area-inset-bottom) + 24px);
  }

  .article-chat-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .article-chat-modal {
    width: 100vw;
    --studio-chatbot-viewport-height: 84dvh;
    height: var(--studio-chatbot-viewport-height);
    max-height: var(--studio-chatbot-viewport-height);
    border-radius: 24px 24px 0 0;
  }

  .studio-chatbot__overlay {
    align-items: flex-end;
    padding: 0;
  }

  .studio-chatbot__window {
    width: 100vw;
    --studio-chatbot-viewport-height: 84dvh;
    height: var(--studio-chatbot-viewport-height);
    max-height: var(--studio-chatbot-viewport-height);
    border-radius: 24px 24px 0 0;
  }

  .studio-chatbot[data-source="embed"] .studio-chatbot__overlay {
    align-items: flex-end;
    padding: 0;
  }

  .studio-chatbot[data-source="embed"] .studio-chatbot__window {
    width: 100vw;
    --studio-chatbot-viewport-height: 84dvh;
    height: var(--studio-chatbot-viewport-height);
    max-height: var(--studio-chatbot-viewport-height);
    border-radius: 24px 24px 0 0;
  }

  .studio-chatbot[data-source="embed"] .studio-chatbot__sheet-handle,
  .studio-chatbot[data-source="modal"] .studio-chatbot__sheet-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 8px;
    padding-bottom: 4px;
    background: #FFFFFF;
    flex-shrink: 0;
  }

  .studio-chatbot[data-source="embed"] .studio-chatbot__sheet-handle::before,
  .studio-chatbot[data-source="modal"] .studio-chatbot__sheet-handle::before {
    content: "";
    width: 48px;
    height: 4px;
    border-radius: 999px;
    background: #D1D5DB;
  }
}

@media (min-width: 768px) {
  .article-chat-modal-overlay {
    align-items: center;
    padding: 24px;
  }

  .studio-chatbot__overlay {
    align-items: flex-end;
    flex-direction: column;
    justify-content: flex-end;
    gap: 12px;
    padding: 24px;
  }

  .studio-chatbot__window {
    --studio-chatbot-viewport-height: min(76vh, 760px);
    width: min(420px, calc(100vw - 48px));
    transform-origin: right bottom;
  }

  .studio-chatbot__header {
    padding: 12px 24px;
  }

  .studio-chatbot[data-source="embed"] .studio-chatbot__header,
  .studio-chatbot[data-source="modal"] .studio-chatbot__header {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .studio-chatbot__messages {
    padding: 40px 12px calc(16px + var(--studio-chatbot-keyboard-offset, 0px)) 24px;
    gap: 12px;
  }

  .studio-chatbot__stream-dock {
    gap: 12px;
  }

  .studio-chatbot__messages--welcome {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .studio-chatbot__welcome-panel {
    padding: 12px;
  }

  .studio-chatbot__welcome-title {
    font-size: clamp(2.5rem, 5vw, 2.75rem);
  }

  .studio-chatbot__welcome-text {
    margin-top: 10px;
    font-size: 18px;
  }

  .studio-chatbot__welcome-quickstart {
    margin-top: 18px;
  }

  .studio-chatbot__welcome-question {
    width: auto;
    font-size: 15px;
  }

  .studio-chatbot__message-bubble {
    max-width: 85%;
  }

  .studio-chatbot__message-text {
    font-size: 16px;
  }

  .studio-chatbot__link-btn {
    width: auto;
  }

  .studio-chatbot__followup-fade {
    display: block;
    position: absolute;
    top: 8px;
    bottom: 24px;
    width: 56px;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.2s ease;
  }

  .studio-chatbot__external-links {
    padding: 8px 24px;
  }

  .studio-chatbot__input-area {
    padding: 8px 24px calc(env(safe-area-inset-bottom) + 24px);
  }
}

@media (min-width: 1024px) {
  .studio-chatbot__messages {
    padding-left: 24px;
    padding-right: 12px;
  }

  .studio-chatbot__input-area {
    padding-left: 32px;
    padding-right: 32px;
  }

  .studio-chatbot__welcome-title {
    font-size: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .studio-chatbot__bubble {
    animation: none;
  }

  .studio-chatbot__bubble::after,
  .studio-chatbot__bubble-text,
  .studio-chatbot__bubble-badge {
    animation: none;
  }

  .studio-chatbot__typing-dot {
    animation: none;
    opacity: 0.7;
  }

  .studio-chatbot__bubble-avatar--idle,
  .studio-chatbot__bubble-avatar.fitty-bob,
  .studio-chatbot__welcome-avatar--idle,
  .studio-chatbot__message-avatar.fitty-idle,
  .studio-chatbot__message-avatar.fitty-bob {
    animation: none;
  }

  .studio-chatbot__spinner {
    animation-duration: 2.4s;
  }

  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message,
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__message--response-ready > .studio-chatbot__message-meta-row--assistant,
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__completion-item,
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__followup-pill,
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__window--joyce-entering .studio-chatbot__header-left,
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__window--joyce-entering .studio-chatbot__header-actions,
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__window--joyce-entering .studio-chatbot__header-avatar,
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__window--joyce-entering .studio-chatbot__input-area,
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__welcome-message-title,
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__welcome-message-description,
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__bubble,
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__window,
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__header-btn--new-session svg,
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__presence-wave,
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__presence-wave::before,
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__presence-wave i,
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__stream-fragment,
  .studio-chatbot__answer-feedback--saved .studio-chatbot__answer-feedback-prompt,
  .studio-chatbot__answer-feedback--saved button,
  .studio-chatbot__answer-feedback--saved button::before,
  .studio-chatbot__answer-feedback--saved button::after,
  .studio-chatbot__answer-feedback--saved .studio-chatbot__answer-feedback-icon,
  .studio-chatbot__message-copy--celebrating,
  .studio-chatbot__message-copy--celebrating .studio-chatbot__message-copy-icon,
  .studio-chatbot__message-copy--celebrating::before,
  .studio-chatbot__message-copy--celebrating::after {
    animation: none !important;
  }

  .studio-chatbot__answer-feedback--saved .studio-chatbot__answer-feedback-prompt,
  .studio-chatbot__answer-feedback--saved button:not(.studio-chatbot__answer-feedback-button--selected) {
    display: none;
  }

  .studio-chatbot__answer-feedback--saved .studio-chatbot__answer-feedback-button--selected {
    transform: none;
  }

  .studio-chatbot__answer-feedback--saved .studio-chatbot__answer-feedback-button--selected::before,
  .studio-chatbot__answer-feedback--saved .studio-chatbot__answer-feedback-button--selected::after {
    display: none;
  }

  .studio-chatbot__message-copy--celebrating::before,
  .studio-chatbot__message-copy--celebrating::after {
    display: none;
  }

  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__presence-wave {
    opacity: 0.7;
    transform: none;
  }

  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__presence-wave::before {
    transform: scale3d(0.94, 0.78, 1);
  }

  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__presence-wave i {
    transform: scaleY(var(--joyce-wave-peak, 0.7));
  }

  .studio-chatbot *,
  .studio-chatbot *::before,
  .studio-chatbot *::after {
    transition-duration: 0.01ms !important;
  }
}

/* ── Toast ── */

.studio-chatbot__toast {
  position: fixed;
  bottom: 90px;
  right: 24px;
  background: #1D1D1F;
  color: #FFFFFF;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.studio-chatbot__toast--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── KI-Suche (/ki-suche) clay-world skin ──
   Scoped to .gym-finder-shell so the per-studio and article chat modals keep
   their own look. Greeting is the hero stage, the composer its focal point. */

.gym-finder-shell .gym-finder__stage {
  background:
    radial-gradient(42% 34% at 50% 44%, var(--color-accent-50) 0%, rgb(255 246 237 / 0) 100%),
    radial-gradient(95% 75% at 50% 46%, var(--color-cream) 0%, var(--color-surface) 78%);
}

.gym-finder-shell .gym-finder__input-card .studio-chatbot__composer {
  border: 0;
  border-radius: 24px;
  background: var(--color-surface);
  box-shadow: 0 0 0 1px var(--color-primary-200), var(--shadow-field);
  transition: box-shadow 150ms ease;
}

.gym-finder-shell .gym-finder__input-card .studio-chatbot__composer:focus-within {
  box-shadow: 0 0 0 2px var(--color-accent-800), var(--shadow-field);
}

.gym-finder-shell .gym-finder__input-card .studio-chatbot__input {
  border-radius: 24px;
  color: var(--color-text-primary);
}

.gym-finder-shell .gym-finder__input-card .studio-chatbot__input::placeholder {
  color: var(--color-primary-400);
}

.gym-finder-shell .gym-finder__greeting .studio-chatbot__composer--with-avatar {
  min-height: 76px;
}

.gym-finder-shell .gym-finder__greeting .studio-chatbot__composer--with-avatar .studio-chatbot__input {
  min-height: 76px;
  max-height: 76px;
  padding-top: 24px;
  padding-bottom: 24px;
  padding-left: 80px;
  padding-right: 80px;
}

.gym-finder-shell .gym-finder__greeting .studio-chatbot__composer-avatar {
  left: 14px;
  width: 56px;
  height: 56px;
}

.gym-finder-shell .gym-finder__input-card .studio-chatbot__composer-actions {
  right: 12px;
  width: 52px;
  height: 52px;
}

.gym-finder-shell .gym-finder__input-card .studio-chatbot__send-btn {
  width: 52px;
  min-width: 52px;
  height: 52px;
  min-height: 52px;
  border-radius: 14px;
  background: var(--color-accent-600);
  color: #FFFFFF;
  transition: background-color var(--ui-dur-fast) var(--ui-ease), color var(--ui-dur-fast) var(--ui-ease), scale var(--ui-dur-fast) var(--ui-ease);
}

.gym-finder-shell .gym-finder__input-card .studio-chatbot__send-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

@media (hover: hover) {
  .gym-finder-shell .gym-finder__input-card .studio-chatbot__send-btn:hover:not(:disabled) {
    background: var(--color-accent-700);
    transform: none;
  }
}

.gym-finder-shell .gym-finder__input-card .studio-chatbot__send-btn:active:not(:disabled) {
  background: var(--color-accent-800);
}

.gym-finder-shell .gym-finder__input-card .studio-chatbot__send-btn:disabled {
  opacity: 1;
  background: var(--color-primary-100);
  color: var(--color-primary-400);
  cursor: default;
}

.gym-finder-shell .gym-finder__input-card .studio-chatbot__send-btn:focus-visible {
  outline: 2px solid var(--color-accent-800);
  outline-offset: 3px;
}

/* Dock: the composer floats over a white fade instead of sitting on a rule. */
.gym-finder-shell .gym-finder__dock-inner::before {
  content: "";
  position: absolute;
  inset-inline: -16px;
  bottom: calc(100% - 30px);
  height: 64px;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(to top, var(--color-surface) 50%, rgb(255 255 255 / 0));
}

.gym-finder-shell .gym-finder__dock .studio-chatbot__composer {
  border-radius: 20px;
  min-height: 60px;
}

.gym-finder-shell .gym-finder__dock .studio-chatbot__input {
  border-radius: 20px;
  min-height: 60px;
  max-height: 60px;
  padding-top: 18px;
  padding-bottom: 18px;
  padding-left: 20px;
  padding-right: 64px;
}

.gym-finder-shell .gym-finder__dock .studio-chatbot__composer-actions {
  right: 8px;
  width: 44px;
  height: 44px;
}

.gym-finder-shell .gym-finder__dock .studio-chatbot__send-btn {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: 12px;
}

.gym-finder-shell .gym-finder__dock .studio-chatbot__send-btn svg {
  width: 18px;
  height: 18px;
}

/* Messages: assistant avatar stays in the header row on every width. */
.gym-finder-shell .studio-chatbot__message-avatar--inline {
  display: block;
  width: 28px;
  height: 28px;
}

.gym-finder-shell [data-filter-pills="true"] {
  border-top: 1px solid var(--color-cream-line);
  padding-top: 16px;
}

@media (max-width: 639px) {
  .gym-finder-shell .gym-finder__greeting .studio-chatbot__composer--with-avatar {
    min-height: 64px;
  }

  .gym-finder-shell .gym-finder__greeting .studio-chatbot__composer--with-avatar .studio-chatbot__input {
    min-height: 64px;
    max-height: 64px;
    padding-top: 20px;
    padding-bottom: 20px;
    padding-left: 62px;
    padding-right: 66px;
    font-size: 16px;
    line-height: 24px;
  }

  .gym-finder-shell .gym-finder__greeting .studio-chatbot__composer-avatar {
    left: 10px;
    width: 46px;
    height: 46px;
  }

  .gym-finder-shell .gym-finder__input-card .studio-chatbot__composer,
  .gym-finder-shell .gym-finder__input-card .studio-chatbot__input {
    border-radius: 20px;
  }

  .gym-finder-shell .gym-finder__greeting .studio-chatbot__composer-actions {
    right: 8px;
    width: 48px;
    height: 48px;
  }

  .gym-finder-shell .gym-finder__greeting .studio-chatbot__send-btn {
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;
    border-radius: 13px;
  }

  .gym-finder-shell .gym-finder__dock .studio-chatbot__composer,
  .gym-finder-shell .gym-finder__dock .studio-chatbot__input {
    min-height: 56px;
    max-height: 56px;
  }

  .gym-finder-shell .gym-finder__dock .studio-chatbot__input {
    padding-top: 16px;
    padding-bottom: 16px;
    padding-left: 16px;
    padding-right: 60px;
  }
}

/* ========================================
   Interaction language alignment (app/assets/tailwind/interaction.css)
   Chat controls use the site-wide timing, never lift on hover and settle to
   0.97 while pressed. Fallbacks keep the widget working where the Tailwind
   tokens are not loaded (embeds).
   ======================================== */
.studio-chatbot__header-btn,
.studio-chatbot__welcome-question,
.studio-chatbot__message-link,
.studio-chatbot__message-text a.studio-chatbot__source-pill,
[data-message-text="true"] a.studio-chatbot__source-pill,
.studio-chatbot__response-chip,
.studio-chatbot__link-chip,
.studio-chatbot__answer-feedback button,
.studio-chatbot__feedback-reason-option,
.studio-chatbot__link-btn,
.studio-chatbot__followup-pill,
.studio-chatbot__retry-bubble,
.studio-chatbot__suggested-chip,
.studio-chatbot__external-link,
.studio-chatbot__send-btn {
  transition-property: background-color, border-color, color, text-decoration-color, box-shadow, opacity, scale;
  transition-duration: var(--ui-dur-fast, 180ms);
  transition-timing-function: var(--ui-ease, cubic-bezier(0.22, 1, 0.36, 1));
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .studio-chatbot__header-btn:hover,
  .studio-chatbot__send-btn:hover:not(:disabled) {
    transform: none;
  }
}

.studio-chatbot__header-btn:active,
.studio-chatbot__welcome-question:active,
.studio-chatbot__message-text a.studio-chatbot__source-pill:active,
[data-message-text="true"] a.studio-chatbot__source-pill:active,
.studio-chatbot__response-chip:active,
.studio-chatbot__link-chip:active,
.studio-chatbot__answer-feedback button:active,
.studio-chatbot__feedback-reason-option:active,
.studio-chatbot__link-btn:active,
.studio-chatbot__followup-pill:active,
.studio-chatbot__retry-bubble:active,
.studio-chatbot__suggested-chip:active,
.studio-chatbot__external-link:active,
.studio-chatbot__send-btn:active:not(:disabled) {
  scale: var(--ui-press-scale, 0.97);
  transition-duration: var(--ui-dur-press, 120ms);
}

@media (prefers-reduced-motion: reduce) {
  .studio-chatbot__header-btn:active,
  .studio-chatbot__welcome-question:active,
  .studio-chatbot__message-text a.studio-chatbot__source-pill:active,
  [data-message-text="true"] a.studio-chatbot__source-pill:active,
  .studio-chatbot__response-chip:active,
  .studio-chatbot__link-chip:active,
  .studio-chatbot__answer-feedback button:active,
  .studio-chatbot__feedback-reason-option:active,
  .studio-chatbot__link-btn:active,
  .studio-chatbot__followup-pill:active,
  .studio-chatbot__retry-bubble:active,
  .studio-chatbot__suggested-chip:active,
  .studio-chatbot__external-link:active,
  .studio-chatbot__send-btn:active:not(:disabled) {
    scale: none;
  }
}

/* Empty inputs never wrap their placeholder onto a second line; long examples
   end in an ellipsis instead. Typed text still wraps normally. */
.studio-chatbot__input:placeholder-shown,
ff-chat-modal textarea:placeholder-shown {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========================================
   JOYCE motion for the Fitty modal
   The JOYCE embed (injoy.de) is the motion baseline: message entrances,
   streaming, follow-up pills, composer focus, send and header buttons.
   Copied from the injoy-blue rules above (motion properties only), so the
   Fitty modal moves the same way while keeping its own colours.
   ======================================== */
.article-chat-modal:not([data-theme]) {
  --joyce-ease: cubic-bezier(0.16, 1, 0.3, 1);
}
@media (prefers-reduced-motion: no-preference) {
  .article-chat-modal:not([data-theme]) .studio-chatbot__header-btn {
    transition: background-color 180ms ease, color 180ms ease, transform 260ms var(--joyce-ease);
  }
  @media (hover: hover) {
    .article-chat-modal:not([data-theme]) .studio-chatbot__header-btn:hover {
      transform: translateY(-1px) scale(1.04);
    }
  }
  .article-chat-modal:not([data-theme]) .studio-chatbot__header-btn:active {
    transform: scale(0.92);
  }
  @media (hover: hover) {
    .article-chat-modal:not([data-theme]) .studio-chatbot__header-btn--new-session:hover {
      transform: rotate(-18deg) scale(1.04);
    }
  }
  .article-chat-modal:not([data-theme]) .studio-chatbot__header-btn--new-session.studio-chatbot__header-btn--spinning svg {
    transform-origin: center;
    animation: joyce-new-session-spin 440ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .article-chat-modal:not([data-theme]) .studio-chatbot__message:not([data-message-variant="welcome"]) {
    animation: joyce-message-enter 360ms var(--joyce-ease) both;
  }
  .article-chat-modal:not([data-theme]) .studio-chatbot__message--user:not([data-message-variant="welcome"]) {
    transform-origin: right center;
    animation-name: joyce-user-message-enter;
    animation-duration: 500ms;
  }
  .article-chat-modal:not([data-theme]) .studio-chatbot__message[data-message-variant="welcome"] {
    animation: joyce-welcome-enter 460ms var(--joyce-ease) 150ms both;
  }
  .article-chat-modal:not([data-theme]) .studio-chatbot__welcome-message-title {
    animation: joyce-title-reveal 520ms var(--joyce-ease) 220ms both;
  }
  .article-chat-modal:not([data-theme]) .studio-chatbot__welcome-message-description {
    animation: joyce-description-reveal 500ms var(--joyce-ease) 320ms both;
  }
  .article-chat-modal:not([data-theme]) .studio-chatbot__stream-fragment {
    animation: joyce-stream-fragment-wave 240ms cubic-bezier(0.16, 1, 0.3, 1) both;
    will-change: filter, opacity;
  }
  .article-chat-modal:not([data-theme]) .studio-chatbot__message[data-message-variant="welcome"] .studio-chatbot__followup-pill {
    animation: joyce-chip-enter 440ms var(--joyce-ease) 450ms both;
  }
  .article-chat-modal:not([data-theme]) .studio-chatbot__message[data-message-variant="welcome"] .studio-chatbot__followup-pill:nth-child(2) {
    animation-delay: 515ms;
  }
  .article-chat-modal:not([data-theme]) .studio-chatbot__message[data-message-variant="welcome"] .studio-chatbot__followup-pill:nth-child(3) {
    animation-delay: 580ms;
  }
  .article-chat-modal:not([data-theme]) .studio-chatbot__message:not([data-message-variant="welcome"]) .studio-chatbot__followup-pill {
    animation: joyce-chip-enter 340ms var(--joyce-ease) both;
  }
  .article-chat-modal:not([data-theme]) .studio-chatbot__message:not([data-message-variant="welcome"]) .studio-chatbot__followup-pill:nth-child(2) {
    animation-delay: 45ms;
  }
  .article-chat-modal:not([data-theme]) .studio-chatbot__message:not([data-message-variant="welcome"]) .studio-chatbot__followup-pill:nth-child(3) {
    animation-delay: 90ms;
  }
  .article-chat-modal:not([data-theme]) .studio-chatbot__followup-pill {
    transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease, transform 260ms var(--joyce-ease);
  }
  @media (hover: hover) {
    .article-chat-modal:not([data-theme]) .studio-chatbot__followup-pill:hover {
      transform: translateY(-2px);
    }
  }
  .article-chat-modal:not([data-theme]) .studio-chatbot__followup-pill:active {
    transform: translateY(0) scale(0.97);
  }
  .article-chat-modal:not([data-theme]) .studio-chatbot__composer {
    transition: border-color 200ms ease, background-color 200ms ease, box-shadow 260ms var(--joyce-ease), transform 260ms var(--joyce-ease);
  }
  .article-chat-modal:not([data-theme]) .studio-chatbot__composer:focus-within {
    transform: translateY(-2px) scale(1.004);
  }
  .article-chat-modal:not([data-theme]) .studio-chatbot__send-btn {
    transition: background-color 180ms ease, color 180ms ease, box-shadow 220ms ease, opacity 180ms ease, transform 280ms var(--joyce-ease);
  }
  @media (hover: hover) {
    .article-chat-modal:not([data-theme]) .studio-chatbot__send-btn:hover:not(:disabled) {
      transform: translateY(-2px) scale(1.04);
    }
  }
  .article-chat-modal:not([data-theme]) .studio-chatbot__send-btn:active:not(:disabled) {
    transform: scale(0.92);
  }
  .article-chat-modal:not([data-theme]) .studio-chatbot__message--streaming > .studio-chatbot__message-meta-row--assistant,
  .article-chat-modal:not([data-theme]) .studio-chatbot__message--response-ready:not(.studio-chatbot__message--completion-visible) > .studio-chatbot__message-meta-row--assistant,
  .article-chat-modal:not([data-theme]) .studio-chatbot__message--streaming .studio-chatbot__completion-item,
  .article-chat-modal:not([data-theme]) .studio-chatbot__message--response-ready:not(.studio-chatbot__message--completion-visible) .studio-chatbot__completion-item {
    opacity: 0;
    transform: translate3d(0, 12px, 0) scale(0.985);
  }
  .article-chat-modal:not([data-theme]) .studio-chatbot__message--completion-visible > .studio-chatbot__message-meta-row--assistant,
  .article-chat-modal:not([data-theme]) .studio-chatbot__message--completion-visible .studio-chatbot__completion-item,
  .article-chat-modal:not([data-theme]) .studio-chatbot__message:not(.studio-chatbot__message--streaming):not(.studio-chatbot__message--response-ready) .studio-chatbot__completion-item {
    animation: joyce-completion-enter 500ms var(--joyce-ease) both;
  }
  .article-chat-modal:not([data-theme]) .studio-chatbot__message--completion-visible .studio-chatbot__completion-item {
    animation-delay: 40ms;
  }
  .article-chat-modal:not([data-theme]) .studio-chatbot__message--completion-visible > .studio-chatbot__message-meta-row--assistant {
    animation-delay: 110ms;
  }
}
.studio-chatbot__input::placeholder {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dictation stays inside the existing composer on both desktop and mobile. */
.studio-chatbot__composer--voice .studio-chatbot__composer-actions { width: 92px; gap: 4px; }
.studio-chatbot__composer--voice .studio-chatbot__input { padding-right: 108px; }
.studio-chatbot__mic-btn {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #374151;
  cursor: pointer;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.studio-chatbot__mic-btn[hidden], .studio-chatbot__voice-feedback button[hidden] { display: none; }
@media (hover: hover) {
  .studio-chatbot__mic-btn:hover { background: #f3f4f6; }
}
.studio-chatbot__mic-btn[data-recording="true"] { background: #fee2e2; color: #991b1b; }
.studio-chatbot__mic-btn:disabled { opacity: 0.5; cursor: wait; }
.studio-chatbot__mic-btn:focus-visible, .studio-chatbot__voice-feedback button:focus-visible {
  outline: 2px solid var(--studio-chatbot-accent, #FF7000);
  outline-offset: 2px;
}
.studio-chatbot__voice-feedback { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #374151; }
.studio-chatbot__voice-feedback span:not(:empty) { padding: 8px 0; }
.studio-chatbot__voice-feedback button { border: 0; background: transparent; color: inherit; text-decoration: underline; min-height: 44px; cursor: pointer; }

.studio-chatbot__voice-feedback meter { width: 48px; flex-shrink: 0; }
.studio-chatbot__voice-feedback meter[hidden] { display: none; }
.studio-chatbot__voice-feedback span { min-width: 0; flex: 1; }

.studio-chatbot__composer--voice:has(.studio-chatbot__voice-feedback span:not(:empty)) {
  height: auto;
  min-height: 100px;
}
.studio-chatbot__composer--voice .studio-chatbot__voice-feedback { margin: 56px 12px 0; }
.studio-chatbot__composer--voice .studio-chatbot__composer-actions { top: 28px; }

/* Studio chat: a focused conversation, a stable composer, and one voice flow. */
.article-chat-modal__input-card--voice { position: relative; }
.article-chat-modal__dictate,
.article-chat-modal__voice-cancel,
.article-chat-modal__playback-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 44px;
  min-width: 44px;
  gap: 8px;
  padding: 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  pointer-events: auto;
}
.article-chat-modal__dictate:disabled { opacity: .5; cursor: wait; }
.article-chat-modal__voice-check,
.article-chat-modal__listening-label { display: none; }
.article-chat-modal__voice-bar [hidden] { display: none; }
.article-chat-modal__voice-bar [role="status"]:not(:empty) { display: block; padding: 8px 4px; font-size: 13px; line-height: 20px; color: var(--joyce-muted, #5b6167); }
.article-chat-modal__waveform { display: flex; align-items: center; justify-content: center; height: 32px; gap: 4px; overflow: hidden; }
.article-chat-modal__waveform span { flex: 1; max-width: 4px; min-width: 2px; height: var(--bar-height); border-radius: 4px; background: currentColor; transform: scaleY(calc(.15 + var(--voice-level, 0) * .85)); }
.article-chat-modal__input-card--voice[data-voice-phase="recording"] .article-chat-modal__mic-icon { display: none; }
.article-chat-modal__input-card--voice[data-voice-phase="recording"] .article-chat-modal__voice-check { display: block; }

.article-chat-modal-overlay[data-presentation="floating"] {
  background: rgb(30 36 40 / 20%) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  pointer-events: auto;
  transition: opacity 180ms ease-out;
}
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) {
  --joyce-ink: #2a2622;
  --joyce-muted: #6f6860;
  --joyce-accent: color-mix(in srgb, var(--studio-chatbot-accent-strong) 85%, #000);
  --joyce-line: color-mix(in srgb, var(--studio-chatbot-accent) 12%, #e8e5e1);
  --joyce-soft: color-mix(in srgb, var(--studio-chatbot-accent) 5%, #fff);
  --studio-chatbot-content-max-width: 100%;
  color: var(--joyce-ink);
  pointer-events: auto;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 24px 64px -16px rgb(42 38 34 / 20%);
}
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__header {
  min-height: 72px;
  gap: 8px;
  padding: 16px 12px 12px 20px !important;
  border: 0;
  background: transparent;
}
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__header > :first-child { flex: 1; min-width: 0; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__header > :last-child { flex-shrink: 0; gap: 0; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) [data-article-chat-modal-target="welcomeAvatar"] { width: 32px; height: 32px; margin-right: 12px; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__header .font-display { font-family: inherit; font-size: 16px; font-weight: 600; line-height: 24px; color: var(--joyce-ink); }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__header .text-sm { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; font-size: 13px; line-height: 20px; white-space: normal; color: var(--joyce-muted); }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__header-btn { width: 44px; height: 44px; border-radius: 12px; color: var(--joyce-muted); background: transparent; }
@media (hover: hover) {
  :is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__header-btn:hover { background: var(--joyce-soft); color: var(--joyce-ink); transform: none; }
}
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__greeting {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: flex-start;
  padding: 24px;
}
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__greeting[hidden] { display: none; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .chat-shell__welcome-frame {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  margin: auto 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__intro { text-align: center; margin: 0; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__presence { display: block; width: 88px; height: 88px; margin: 0 auto 8px; padding: 0; border: 0; background: transparent; cursor: pointer; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__presence > * { display: block; width: 100%; height: 100%; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__welcome-title { font-family: inherit; font-size: 28px; font-weight: 500; line-height: 36px; letter-spacing: -.025em; color: var(--joyce-ink); margin: 0; text-wrap: balance; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__welcome-text { font-size: 14px; line-height: 22px; font-weight: 400; color: var(--joyce-muted); margin: 0 auto; max-width: 32ch; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .chat-shell__welcome-home { display: none; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__welcome-quickstart { display: none; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__suggestions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 8px; width: 100%; max-width: 360px; margin: 20px auto 0; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__welcome-question {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 64px;
  padding: 12px;
  margin: 0;
  border: 0;
  border-radius: 12px;
  background: color-mix(in srgb, var(--joyce-ink) 3%, #fff);
  box-shadow: none;
  color: var(--joyce-ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-align: center;
  transform: none;
}
@media (hover: hover) {
  :is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__welcome-question:hover { color: var(--joyce-accent); background: var(--joyce-soft); box-shadow: none; transform: none; }
}
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__welcome-question-icon { display: none; order: 2; margin-left: 12px; flex-shrink: 0; color: var(--joyce-muted); }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .chat-shell__welcome-frame .chat-shell__welcome-cta-shell { display: flex; justify-content: center; align-self: center; width: 100%; max-width: 360px; margin: 8px auto 0; text-align: center; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__welcome-booking-cta { display: inline-flex; justify-content: center; width: auto; min-height: 44px; padding: 8px 12px; gap: 8px; border: 0; background: transparent; box-shadow: none; color: var(--joyce-accent); font-size: 13px; line-height: 20px; font-weight: 400; }
@media (hover: hover) {
  :is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__welcome-booking-cta:hover { text-decoration: underline; background: transparent; transform: none; }
}
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__input-area { position: relative; bottom: 0 !important; padding: 16px 20px calc(20px + env(safe-area-inset-bottom)); border: 0; background: #fff; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__composer { display: flex; flex-direction: row; align-items: center; min-height: 60px; padding: 4px 8px; border: 1px solid var(--joyce-line); border-radius: 28px; background: #fff; box-shadow: 0 8px 24px -16px rgb(30 36 40 / 8%); }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__composer:focus-within { background: #fff; border-color: color-mix(in srgb, var(--studio-chatbot-accent) 35%, #ddd); box-shadow: 0 0 0 3px var(--joyce-soft); transform: none; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__input { position: relative; inset: auto; flex: 1; min-width: 0; width: 0; min-height: 48px; max-height: 144px; padding: 12px 8px 12px 12px; border: 0; border-radius: 0; background: transparent; color: var(--joyce-ink); font-family: inherit; font-size: 16px; line-height: 24px; white-space: pre-wrap; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__input::placeholder { color: var(--joyce-muted); font-weight: 400; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__composer-actions { position: relative; inset: auto; transform: none; display: flex; justify-content: flex-end; flex-shrink: 0; width: auto; height: 48px; padding: 2px 0; margin: 0; gap: 8px; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__playback-toggle { margin-right: auto; color: var(--joyce-muted); font-size: 12px; line-height: 20px; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__playback-toggle svg { width: 16px; height: 16px; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__playback-toggle[aria-pressed="true"] { color: var(--joyce-accent); background: var(--joyce-soft); }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__dictate { padding: 8px; background: transparent; color: var(--joyce-muted); font-size: 13px; font-weight: 500; }
@media (hover: hover) {
  :is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__dictate:hover { background: var(--joyce-soft); color: var(--joyce-accent); }
}
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__input-card--voice[data-has-draft="true"] .article-chat-modal__dictate { background: transparent; color: var(--joyce-muted); padding: 8px; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__input-card--voice[data-has-draft="true"] .article-chat-modal__dictate-label { display: none; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__send-btn { width: 44px; height: 44px; min-width: 44px; min-height: 44px; border: 0; border-radius: 50%; background: var(--joyce-accent); color: #fff; box-shadow: none; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__send-btn:disabled { background: var(--joyce-soft); color: #89949b; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__input-card--voice[data-has-draft="false"] .studio-chatbot__send-btn { display: none; }
@media (hover: hover) {
  :is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) :is(.article-chat-modal__playback-toggle, .article-chat-modal__voice-cancel):hover { background: var(--joyce-soft); }
}
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) :is(.studio-chatbot__header-btn, .article-chat-modal__dictate, .article-chat-modal__voice-cancel, .article-chat-modal__playback-toggle, .studio-chatbot__send-btn, .studio-chatbot__welcome-question, .studio-chatbot__welcome-booking-cta):focus-visible { outline: 2px solid var(--joyce-accent); outline-offset: 2px; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__input-card--voice:is([data-voice-phase="recording"], [data-voice-phase="transcribing"], [data-voice-phase="permission"]) .studio-chatbot__input { visibility: hidden; min-height: 80px; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__input-card--voice:is([data-voice-phase="recording"], [data-voice-phase="transcribing"], [data-voice-phase="permission"]) :is(.studio-chatbot__send-btn, .article-chat-modal__playback-toggle) { visibility: hidden; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__input-card--voice:is([data-voice-phase="recording"], [data-voice-phase="transcribing"], [data-voice-phase="permission"]) .studio-chatbot__send-btn { display: none; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__input-card--voice[data-voice-phase="recording"] .article-chat-modal__dictate { height: 44px; padding: 10px 14px; gap: 8px; border-radius: 12px; color: #fff; background: var(--joyce-accent); font-size: 14px; line-height: 24px; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__input-card--voice[data-voice-phase="recording"] .article-chat-modal__dictate-label { display: inline; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__voice-bar:not([data-phase="idle"]):has(button:not([hidden])) { position: absolute; display: grid; grid-template-columns: 1fr auto; grid-template-rows: 20px 24px; gap: 0 12px; top: 12px; left: 16px; right: 16px; height: 44px; color: var(--joyce-accent); z-index: 3; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__voice-bar:not([data-phase="idle"]) [role="status"] { padding: 0; grid-column: 2; grid-row: 1; font-variant-numeric: tabular-nums; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__voice-bar[data-phase="recording"] .article-chat-modal__listening-label { display: block; grid-column: 1; grid-row: 1; font-size: 13px; line-height: 20px; font-weight: 500; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__waveform { grid-column: 1 / -1; grid-row: 2; height: 24px; padding: 0 16px; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__voice-bar:not([data-phase="idle"]) .article-chat-modal__voice-cancel { position: absolute; top: 52px; left: -4px; color: var(--joyce-muted); }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__voice-bar:is([data-phase="permission"], [data-phase="transcribing"]) [role="status"] { grid-column: 1 / -1; align-self: center; grid-row: 1 / -1; padding-left: 28px; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__voice-bar:is([data-phase="permission"], [data-phase="transcribing"])::before { content: ""; position: absolute; top: 20px; left: 0; width: 16px; height: 16px; border: 2px solid var(--joyce-line); border-top-color: var(--joyce-accent); border-radius: 50%; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__messages { background: transparent; padding: 24px 24px 16px; opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__message-bubble--user { background: var(--joyce-soft); color: var(--joyce-ink); box-shadow: none; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__message-text--user { color: var(--joyce-ink); }
@media (prefers-reduced-motion: no-preference) {
  :is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__voice-bar:is([data-phase="permission"], [data-phase="transcribing"])::before { animation: chatbot-voice-transcribing 800ms linear infinite; }
  .article-chat-modal__waveform span { transition: transform 80ms linear; }
}
@keyframes chatbot-voice-transcribing { to { transform: rotate(360deg); } }
@media (min-width: 768px) {
  .article-chat-modal-overlay[data-presentation="floating"] { align-items: flex-end; justify-content: flex-end; padding: 24px; }
  :is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) { --studio-chatbot-viewport-height: min(720px, calc(100dvh - 48px)); width: 448px; max-width: calc(100vw - 48px); }
}
@media (max-width: 767px) {
  .article-chat-modal-overlay[data-presentation="floating"] { padding: 0 0 var(--joyce-keyboard-inset, 0px); }
  :is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) { --studio-chatbot-viewport-height: calc(100dvh - var(--joyce-keyboard-inset, 0px)); width: 100%; border-radius: 0; }
  :is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__sheet-handle { display: none; }
  :is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__greeting { padding: 24px; }
  :is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__header { padding: 16px 12px 12px 20px !important; }
  :is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__input-area { padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
}

:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__input-area::before { display: none; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__message-bubble--bot,
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__message-text { color: var(--joyce-ink); }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__message-time,
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__timestamp { color: var(--joyce-muted); }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__message-link { color: var(--joyce-accent); }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__followup-pill { background: #fff; border-color: var(--joyce-line); color: var(--joyce-ink); }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__message-copy { color: var(--joyce-muted); border-color: var(--joyce-line); background: transparent; }

:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__message-text :is(p, li, strong, h1, h2, h3, h4, blockquote) { color: var(--joyce-ink); }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) [data-article-chat-modal-target="welcomeAvatar"],
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__message-avatar--inline { background: transparent; padding: 0; border-radius: 0; }

:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__message--bot:not([data-message-variant="welcome"]) .studio-chatbot__message-text { color: var(--joyce-ink); }

:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__message-text a.studio-chatbot__source-pill { color: var(--joyce-accent); background: var(--joyce-soft); border-color: var(--joyce-line); }
@media (hover: hover) {
  :is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__message-text a.studio-chatbot__source-pill:hover { color: var(--joyce-ink); background: var(--studio-chatbot-accent-hover-soft); border-color: var(--studio-chatbot-accent-hover-border); }
}
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__message-text a.studio-chatbot__source-pill:focus-visible { outline-color: var(--joyce-accent); }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__message-bubble--error,
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__message-bubble--error .studio-chatbot__message-text { color: #9f2424; background: #fff1f0; }
@media (hover: hover) {
  :is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__message-bubble--error:hover, :is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__message-bubble--error:hover .studio-chatbot__message-text { color: #862020; background: #ffe4e1; }
}

:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__playback-toggle { margin: 0; border-radius: 12px; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) :is([data-article-chat-modal-target="playbackLabel"], .article-chat-modal__dictate-label) { display: none; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__playback-toggle svg { width: 20px; height: 20px; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__voice-bar[data-review="true"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__input-card--voice:is([data-voice-phase="recording"], [data-voice-phase="transcribing"], [data-voice-phase="permission"]) .studio-chatbot__composer { align-items: flex-end; min-height: 120px; border-radius: 24px; }

:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__input-area { box-shadow: none; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) :is(.studio-chatbot__header-btn, .article-chat-modal__playback-toggle, .article-chat-modal__voice-cancel),
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__dictate:not([data-recording="true"]) { width: 44px; height: 44px; padding: 8px; border-radius: 50%; }

:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__presence:focus-visible { outline: 2px solid var(--joyce-accent); outline-offset: 4px; border-radius: 16px; }

:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__message-text { font-size: 16px; line-height: 26px; }

:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__input-card--voice:is([data-voice-phase="recording"], [data-voice-phase="transcribing"], [data-voice-phase="permission"]) .studio-chatbot__composer-actions { position: absolute; bottom: 12px; right: 12px; height: 44px; padding: 0; }
/* Recording shares the compact composer's single-row geometry. */
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__input-card--voice:is([data-voice-phase="recording"], [data-voice-phase="transcribing"], [data-voice-phase="permission"]) .studio-chatbot__composer { min-height: 60px; height: 60px; border-radius: 28px; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__input-card--voice:is([data-voice-phase="recording"], [data-voice-phase="transcribing"], [data-voice-phase="permission"]) .studio-chatbot__input { display: none; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__input-card--voice:is([data-voice-phase="recording"], [data-voice-phase="transcribing"], [data-voice-phase="permission"]) .studio-chatbot__composer-actions { inset: 8px 8px auto auto; height: 44px; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__input-card--voice[data-voice-phase="recording"] .article-chat-modal__dictate { width: 44px; min-width: 44px; height: 44px; padding: 10px; border-radius: 50%; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__input-card--voice[data-voice-phase="recording"] .article-chat-modal__dictate-label { display: none; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__voice-bar:not([data-phase="idle"]):has(button:not([hidden])) { display: flex; align-items: center; gap: 12px; inset: 8px 64px auto 8px; height: 44px; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__voice-bar[data-phase="recording"] .article-chat-modal__listening-label { display: none; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__voice-bar:not([data-phase="idle"]) .article-chat-modal__voice-cancel { position: static; order: -1; flex: 0 0 44px; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__voice-bar:not([data-phase="idle"]) .article-chat-modal__waveform { flex: 1; min-width: 0; height: 24px; padding: 0; gap: 3px; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__voice-bar:not([data-phase="idle"]) [role="status"] { flex-shrink: 0; padding: 0; font-size: 12px; line-height: 20px; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__voice-bar:is([data-phase="permission"], [data-phase="transcribing"]) { right: 16px; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__voice-bar:is([data-phase="permission"], [data-phase="transcribing"])::before { display: none; }

/* Familiar dictation controls: cancel, level/status, stop, send. */
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__composer { border-color: transparent; box-shadow: 0 4px 24px rgb(42 38 34 / 6%); }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__composer:focus-within { border-color: transparent; box-shadow: 0 4px 24px rgb(42 38 34 / 8%); }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__input-card--voice:is([data-voice-phase="recording"], [data-voice-phase="transcribing"]) .studio-chatbot__send-btn { display: inline-flex; visibility: visible; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__input-card--voice:is([data-voice-phase="recording"], [data-voice-phase="transcribing"]) .studio-chatbot__composer-actions { gap: 8px; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__input-card--voice[data-voice-phase="recording"] .article-chat-modal__dictate { background: var(--joyce-soft); color: var(--joyce-ink); }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__voice-bar:not([data-phase="idle"]):has(button:not([hidden])) { right: 112px; gap: 12px; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__voice-cancel { background: var(--joyce-soft); }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__voice-bar[data-phase="recording"] [role="status"] { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__waveform { color: var(--joyce-muted); }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__voice-bar[data-phase="transcribing"] [role="status"] { flex: 1; text-align: center; font-size: 14px; color: var(--joyce-muted); white-space: nowrap; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__input-card--voice[data-voice-phase="transcribing"] .article-chat-modal__dictate { width: 44px; border-radius: 50%; background: var(--joyce-soft); color: var(--joyce-muted); }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__input-card--voice[data-voice-phase="transcribing"] .article-chat-modal__dictate svg { display: none; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__input-card--voice[data-voice-phase="transcribing"] .article-chat-modal__dictate::after { content: ""; width: 18px; height: 18px; border: 2px solid var(--joyce-line); border-top-color: var(--joyce-muted); border-radius: 50%; }
@media (prefers-reduced-motion: no-preference) {
  :is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__input-card--voice[data-voice-phase="transcribing"] .article-chat-modal__dictate::after { animation: chatbot-voice-transcribing 800ms linear infinite; }
}

/* External embeds use the same compact text and dictation geometry. */
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__input-area { background: #fff; box-shadow: none; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__composer { position: relative; display: flex; align-items: center; min-height: 60px; padding: 4px 8px; border: 1px solid transparent; border-radius: 28px; background: #fff; box-shadow: 0 4px 24px rgb(42 38 34 / 6%); }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__composer:focus-within { background: #fff; border-color: transparent; box-shadow: 0 4px 24px rgb(42 38 34 / 8%); transform: none; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__input { position: relative; inset: auto; flex: 1; width: 0; min-width: 0; min-height: 48px; max-height: 144px; padding: 12px 8px 12px 12px; border: 0; background: transparent; font-size: 16px; line-height: 24px; white-space: pre-wrap; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__composer-actions { position: static; flex-shrink: 0; display: flex; gap: 8px; height: 44px; padding: 0; transform: none; }
.studio-chatbot[data-composer-style="compact"] :is(.studio-chatbot__mic-btn,.studio-chatbot__send-btn,.studio-chatbot__voice-cancel) { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 10px; border: 0; border-radius: 50%; box-shadow: none; cursor: pointer; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__mic-btn { background: transparent; color: #6f6860; }
@media (hover: hover) {
  .studio-chatbot[data-composer-style="compact"] .studio-chatbot__mic-btn:hover { background: var(--studio-chatbot-accent-soft); color: var(--studio-chatbot-accent-strong); }
}
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__send-btn { background: color-mix(in srgb, var(--studio-chatbot-accent-strong) 85%, #000); color: #fff; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__composer[data-has-draft="false"][data-voice-phase="idle"] .studio-chatbot__send-btn { display: none; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__voice-feedback { font-size: 13px; line-height: 20px; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__composer[data-voice-phase="idle"] .studio-chatbot__voice-feedback { position: absolute; bottom: 100%; left: 16px; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__composer[data-review="true"] .studio-chatbot__voice-feedback { width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__composer:not([data-voice-phase="idle"]) { height: 60px; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__composer:not([data-voice-phase="idle"]) .studio-chatbot__input { display: none; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__composer:not([data-voice-phase="idle"]) .studio-chatbot__composer-actions { position: absolute; inset: 8px 8px auto auto; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__composer:not([data-voice-phase="idle"]) .studio-chatbot__voice-feedback { position: absolute; inset: 8px 112px auto 8px; height: 44px; display: flex; align-items: center; gap: 12px; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__voice-cancel { order: -1; background: var(--studio-chatbot-accent-soft); color: #6f6860; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__composer:not([data-voice-phase="idle"]) .studio-chatbot__mic-btn { background: var(--studio-chatbot-accent-soft); color: #2a2622; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__voice-waveform { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 3px; height: 24px; color: #6f6860; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__voice-waveform span { flex: 1; max-width: 4px; min-width: 1px; height: var(--bar-height); border-radius: 4px; background: currentColor; transform: scaleY(calc(.15 + var(--voice-level, 0) * .85)); }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__composer[data-voice-phase="recording"] [role="status"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__composer[data-voice-phase="transcribing"] [role="status"] { flex: 1; text-align: center; font-size: 14px; white-space: nowrap; color: #6f6860; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__composer[data-voice-phase="transcribing"] .studio-chatbot__mic-btn svg { display: none; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__composer[data-voice-phase="transcribing"] .studio-chatbot__mic-btn::after { content: ""; width: 18px; height: 18px; border: 2px solid #ddd; border-top-color: #6f6860; border-radius: 50%; }
.studio-chatbot[data-composer-style="compact"] [hidden] { display: none !important; }
@media (prefers-reduced-motion: no-preference) {
  .studio-chatbot[data-composer-style="compact"] .studio-chatbot__composer[data-voice-phase="transcribing"] .studio-chatbot__mic-btn::after { animation: chatbot-voice-transcribing 800ms linear infinite; }
}

.studio-chatbot[data-composer-style="compact"] .studio-chatbot__composer.studio-chatbot__composer--voice { min-height: 60px; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__composer .studio-chatbot__voice-feedback { margin: 0; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__composer-actions { width: auto; inset: auto; pointer-events: auto; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__voice-cancel { flex: 0 0 44px; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__voice-feedback span { flex: none; padding: 0; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__voice-feedback .studio-chatbot__voice-waveform span,
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .article-chat-modal__waveform span { flex: 1; background: hsl(var(--voice-hue) 80% 52%); }

.studio-chatbot[data-composer-style="compact"] .studio-chatbot__header-icon,
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__sheet-handle { display: none; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__header-left { gap: 0; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__header-copy { display: flex; flex-direction: column; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__window { background: #fff; border: 0; }
/* Opening the empty chat: the pieces rise into place one after another, top
   to bottom, on transform and opacity only so they stay on the compositor.
   They start once the panel is most of the way in, so nothing competes with
   the panel's own motion. */
@keyframes studio-chatbot-welcome-rise {
  from { opacity: 0; transform: translate3d(0, 10px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@media (prefers-reduced-motion: no-preference) {
  .studio-chatbot[data-composer-style="compact"] .studio-chatbot__overlay--visible:not(.studio-chatbot__overlay--closing) .chat-shell__welcome-frame > .article-chat-modal__intro > *,
  .studio-chatbot[data-composer-style="compact"] .studio-chatbot__overlay--visible:not(.studio-chatbot__overlay--closing) .chat-shell__welcome-frame > .chat-shell__welcome-shortcuts {
    /* Backwards only: once in place the pieces go back to their own styles, so
       the collapse into the thread can still move and fade them. */
    animation: studio-chatbot-welcome-rise 520ms cubic-bezier(0.16, 1, 0.3, 1) backwards;
    animation-delay: calc(140ms + var(--studio-chatbot-rise-step, 0) * 55ms);
  }
  .studio-chatbot[data-composer-style="compact"] .chat-shell__welcome-frame > .article-chat-modal__intro > :nth-child(2) { --studio-chatbot-rise-step: 1; }
  .studio-chatbot[data-composer-style="compact"] .chat-shell__welcome-frame > .article-chat-modal__intro > :nth-child(3) { --studio-chatbot-rise-step: 2; }
  .studio-chatbot[data-composer-style="compact"] .chat-shell__welcome-frame > .article-chat-modal__intro > :nth-child(n + 4) { --studio-chatbot-rise-step: 3; }
  .studio-chatbot[data-composer-style="compact"] .chat-shell__welcome-frame > .chat-shell__welcome-shortcuts { --studio-chatbot-rise-step: 4; }
}

/* Phone sheet, after Apple's sheet guidance: full height, a strip of the dimmed
   page above it, rounded top corners, and the header as the drag area for
   swipe-to-dismiss. The grabber is styled further down. The voice window is
   a page of its own and stays edge to edge. */
@media (max-width: 767px) {
  .studio-chatbot[data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__window {
    max-height: calc(100dvh - var(--joyce-keyboard-inset, 0px) - 10px);
    border-radius: 20px 20px 0 0;
  }
  /* Top bar like a sheet's toolbar: short centred title, Close as the standard
     symbol in its own section on the trailing edge, the other actions leading. */
  .studio-chatbot[data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__window .studio-chatbot__header {
    position: relative;
    z-index: 2;
    justify-content: center;
    min-height: 56px;
    padding: 6px 8px !important;
    touch-action: none;
  }
  .studio-chatbot[data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__header-left {
    justify-content: center;
    min-width: 0;
    max-width: calc(100% - 208px);
  }
  .studio-chatbot[data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__header-copy {
    align-items: center;
    min-width: 0;
    max-width: 100%;
    text-align: center;
  }
  .studio-chatbot[data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__header-title {
    font-size: 17px;
    font-weight: 600;
    line-height: 22px;
  }
  .studio-chatbot[data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__header-subtitle {
    max-width: 100%;
    overflow: hidden;
    font-size: 12px;
    line-height: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .studio-chatbot[data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__header-actions {
    position: absolute;
    inset: 0 8px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    pointer-events: none;
  }
  .studio-chatbot[data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__header-actions > * { pointer-events: auto; }
  .studio-chatbot[data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__header-actions > .studio-chatbot__header-btn:last-child { margin-left: auto; }
  .studio-chatbot[data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__header-actions > .studio-chatbot__header-btn:last-child svg {
    box-sizing: border-box;
    width: 30px;
    height: 30px;
    padding: 8px;
    border-radius: 50%;
    background: rgb(118 118 128 / 14%);
    color: #4a4a4f;
    stroke-width: 2.4;
  }
  /* Scroll edge effect: a soft fade under the bar, only while content is beneath it. */
  .studio-chatbot[data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__window .studio-chatbot__header::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    height: 24px;
    background: linear-gradient(#fff, rgb(255 255 255 / 0%));
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }
  .studio-chatbot[data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__window[data-scrolled] .studio-chatbot__header::after { opacity: 1; }
}

/* Empty chat: one way to speak, one way to write. The header voice button
   repeats the button in the middle, "new chat" has nothing to reset, and the
   write link points at the input that is already on screen. */
.studio-chatbot.chat-shell--greeting .chat-voice-launch--header,
.studio-chatbot.chat-shell--greeting .studio-chatbot__header-btn--new-session,
.studio-chatbot.chat-shell--greeting .chat-text-launch { display: none; }

/* The open chat keeps the launcher's rainbow glow, so the closed and the open
   state read as the same object. A full-screen sheet has no edge to glow. */
@media (min-width: 768px) {
  .studio-chatbot[data-theme="injoy-blue"][data-composer-style="compact"] .studio-chatbot__window {
    box-shadow:
      0 24px 64px -16px rgb(42 38 34 / 20%),
      -14px -10px 40px rgba(244, 63, 94, 0.15),
      16px -8px 44px rgba(59, 130, 246, 0.16),
      14px 16px 44px rgba(20, 184, 166, 0.13),
      -12px 16px 40px rgba(245, 158, 11, 0.11);
  }
}
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__window::before,
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__window::after,
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__input-area::before { display: none; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__messages--welcome { align-items: center; justify-content: center; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__welcome-panel { box-shadow: none; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__welcome-question-icon svg { width: 16px; height: 16px; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__window .studio-chatbot__messages { font-size: 16px; line-height: 26px; }

.studio-chatbot[data-composer-style="compact"] .studio-chatbot__composer-avatar { display: none !important; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__header-btn svg { width: 20px; height: 20px; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__header-subtitle { letter-spacing: normal; text-transform: none; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__window .studio-chatbot__header { padding: 16px 12px 12px 24px !important; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__welcome-booking-cta svg { width: 16px; height: 16px; flex-shrink: 0; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__overlay { background: rgb(30 36 40 / 20%); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: none; }
@media (min-width: 768px) {
  .studio-chatbot[data-composer-style="compact"] .studio-chatbot__overlay { align-items: flex-end; justify-content: flex-end; padding: 24px; }
}

/* Controls keep fixed hit areas, including hover and pressed states. */
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__composer > .studio-chatbot__composer-actions { height: 44px; padding: 0; gap: 8px; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__send-btn:is(:hover, :active, :focus-visible) { transform: none; box-shadow: none; }

/* Voice conversation is shared by the modal and embedded chat. */
.studio-chatbot .chat-voice-launch { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--studio-chatbot-accent-strong) 85%, #000); color: #fff; font: inherit; cursor: pointer; pointer-events: auto; }
.studio-chatbot .chat-voice-launch svg { width: 22px; height: 22px; flex-shrink: 0; }
.studio-chatbot .chat-voice-launch--header[hidden] { display: none !important; }
.studio-chatbot .chat-voice-launch--text { width: auto; margin: 16px auto 0; padding: 10px 16px; gap: 8px; border-radius: 24px; font-size: 14px; line-height: 24px; font-weight: 500; }
.studio-chatbot .chat-voice-launch[hidden],
.studio-chatbot .studio-chatbot__composer:is([data-voice-phase="recording"], [data-voice-phase="permission"], [data-voice-phase="transcribing"]) .chat-voice-launch,
.studio-chatbot .article-chat-modal__input-card--voice:is([data-voice-phase="recording"], [data-voice-phase="permission"], [data-voice-phase="transcribing"]) .studio-chatbot__composer-actions .chat-voice-launch { display: none; }
.studio-chatbot .chat-voice-conversation { position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column; padding: 20px 24px calc(24px + env(safe-area-inset-bottom)); background: #fff; border-radius: inherit; color: #2a2622; font-family: inherit; }
.studio-chatbot .chat-voice-conversation__top { display: flex; justify-content: flex-start; flex-shrink: 0; }
.studio-chatbot .chat-voice-conversation__top button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 50%; background: #f5f4f2; color: #6f6860; cursor: pointer; }
.studio-chatbot .chat-voice-conversation__body { display: flex; flex: 1; min-height: 0; flex-direction: column; align-items: center; justify-content: center; gap: 20px; text-align: center; }
.studio-chatbot .chat-voice-conversation__avatar { display: flex; align-items: center; justify-content: center; width: min(44vw, 180px); height: min(44vw, 180px); background: transparent; }
.studio-chatbot .chat-voice-conversation__avatar > * { display: block; width: 80%; height: 80%; }
.studio-chatbot .chat-voice-conversation__text { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.studio-chatbot .chat-voice-conversation__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 100%; }
.studio-chatbot .chat-voice-conversation__actions[hidden] { display: none; }
.studio-chatbot .chat-voice-conversation__actions .chat-voice-conversation__action-pill { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid color-mix(in srgb, var(--studio-chatbot-accent-strong) 12%, #e8e5e1); border-radius: 22px; background: #fff; color: color-mix(in srgb, var(--studio-chatbot-accent-strong) 85%, #000); font: inherit; font-size: 14px; line-height: 22px; font-weight: 500; cursor: pointer; }
@media (hover: hover) {
  .studio-chatbot .chat-voice-conversation__actions .chat-voice-conversation__action-pill:hover { background: color-mix(in srgb, var(--studio-chatbot-accent-strong) 5%, #fff); }
}
.studio-chatbot .chat-voice-conversation__stage { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; min-height: 72px; flex-shrink: 0; }
.studio-chatbot .chat-voice-conversation [role="status"] { min-height: 28px; max-width: 30ch; margin: 0; color: #6f6860; font-size: 18px; line-height: 28px; }
.studio-chatbot .chat-voice-conversation__hint { max-width: 28ch; margin: 0; color: #6f6860; font-size: 14px; line-height: 22px; }
.studio-chatbot .chat-voice-conversation__controls { display: flex; flex-shrink: 0; justify-content: center; align-items: center; gap: 16px; padding-top: 24px; }
.studio-chatbot .chat-voice-conversation__controls button { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; padding: 16px; border: 0; border-radius: 50%; background: #f2f1ef; color: #2a2622; cursor: pointer; }
.studio-chatbot .chat-voice-conversation__controls svg { width: 24px; height: 24px; }
.studio-chatbot .chat-voice-conversation__controls button:disabled { opacity: .35; cursor: default; }
.studio-chatbot :is(.chat-voice-launch,.chat-voice-conversation button):focus-visible { outline: 2px solid var(--studio-chatbot-accent-strong); outline-offset: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .studio-chatbot .chat-voice-conversation { animation: chat-voice-enter 220ms ease-out; }
}
@keyframes chat-voice-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-height: 600px) {
  .studio-chatbot .chat-voice-conversation__body { gap: 8px; }
  .studio-chatbot .chat-voice-conversation__avatar { width: 96px; height: 96px; }
  .studio-chatbot .chat-voice-conversation__hint { display: none; }
}

/* Error feedback sits above either composer without changing its geometry. */
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__composer { overflow: visible; }
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__composer[data-voice-phase="idle"] .studio-chatbot__voice-feedback { bottom: calc(100% + 8px); left: 4px; right: 4px; }
.article-chat-modal[data-presentation="floating"] .article-chat-modal__voice-bar[data-phase="idle"]:not([data-review="true"]) { position: absolute; bottom: calc(100% + 8px); left: 4px; right: 4px; }
.article-chat-modal[data-presentation="floating"] .article-chat-modal__voice-bar[data-phase="idle"] [role="status"] { padding: 0; }

/* Two entry paths: text chat or the dedicated voice conversation. */
.studio-chatbot .article-chat-modal__dictate[hidden],
.studio-chatbot .article-chat-modal__voice-bar[hidden],
.article-chat-modal[data-presentation="floating"] [data-article-chat-modal-target="voiceToggle"],
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__header-btn--voice { display: none !important; }

:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__composer[data-multiline="true"] { align-items: flex-end !important; }

.studio-chatbot .chat-voice-launch--text { max-width: 100%; }
.studio-chatbot .chat-voice-launch--text span { min-width: 0; overflow-wrap: anywhere; }

/* Voice has one primary action and a clearly separate return to text. */
.studio-chatbot .chat-voice-conversation__top .chat-voice-conversation__back { width: auto; gap: 4px; padding: 8px 12px 8px 6px; font: inherit; font-size: 14px; line-height: 24px; }
.studio-chatbot .chat-voice-conversation__back svg { width: 20px; height: 20px; }
.studio-chatbot .chat-voice-conversation__body { gap: 16px; }
.studio-chatbot .chat-voice-conversation__controls .chat-voice-conversation__action { width: auto; min-width: 200px; max-width: 100%; min-height: 52px; height: auto; padding: 14px 24px; border-radius: 28px; background: color-mix(in srgb, var(--studio-chatbot-accent-strong) 85%, #000); color: #fff; font: inherit; font-size: 16px; line-height: 24px; font-weight: 500; }
.studio-chatbot .chat-voice-conversation__wave { display: flex; align-items: center; justify-content: center; gap: 4px; width: min(100%, 248px); height: 44px; }
/* Fixed slots: the wave sits on top of the stage and fades, so switching
   phases never moves the avatar or the status line. */
.studio-chatbot .chat-voice-conversation__stage { position: relative; }
.studio-chatbot .chat-voice-conversation__wave { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); transition: opacity 240ms ease, visibility 240ms; }
.studio-chatbot .chat-voice-conversation:not([data-phase="listening"]) .chat-voice-conversation__wave { visibility: hidden; opacity: 0; }
.studio-chatbot .chat-voice-conversation__wave span { flex: 1; max-width: 5px; height: 4px; border-radius: 4px; background: hsl(var(--voice-hue) 80% 52%); }
/* One status style for every phase; only the words change. */
.studio-chatbot .chat-voice-conversation [role="status"] { position: relative; color: var(--studio-chatbot-accent-strong); font-weight: 500; }
.studio-chatbot .chat-voice-conversation__hint { min-height: 22px; }

.studio-chatbot .chat-voice-conversation__top .chat-voice-conversation__back { border-radius: 12px; background: transparent; transform: none; }
@media (hover: hover) {
  .studio-chatbot .chat-voice-conversation__top .chat-voice-conversation__back:hover { background: var(--studio-chatbot-accent-soft); }
}
.studio-chatbot .chat-voice-conversation__captions { width: 100%; max-width: 36ch; max-height: min(160px, 22dvh); min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px; color: #6f6860; font-size: 18px; line-height: 28px; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; }
.studio-chatbot .chat-voice-conversation__captions[hidden] { display: none; }
.studio-chatbot .chat-voice-conversation__captions mark { background: transparent; color: #2a2622; font-weight: 500; }
.studio-chatbot .chat-voice-conversation[data-phase="waiting"] [role="status"]::before { content: ""; position: absolute; top: 7px; right: calc(100% + 8px); width: 14px; height: 14px; border: 2px solid var(--studio-chatbot-accent-soft); border-top-color: var(--studio-chatbot-accent-strong); border-radius: 50%; }
@media (prefers-reduced-motion: no-preference) {
  .studio-chatbot .chat-voice-conversation[data-phase="waiting"] [role="status"]::before { animation: chatbot-voice-transcribing 800ms linear infinite; }
}

.studio-chatbot .chat-text-launch { display: block; width: auto; max-width: 100%; min-height: 44px; margin: 4px auto 0; padding: 8px 16px; border: 0; border-radius: 12px; background: transparent; color: #6f6860; font: inherit; font-size: 14px; line-height: 22px; cursor: pointer; }
@media (hover: hover) {
  .studio-chatbot .chat-text-launch:hover { color: var(--studio-chatbot-accent-strong); text-decoration: underline; }
}
.studio-chatbot .chat-text-launch[hidden] { display: none; }
.studio-chatbot :is(.chat-text-launch, .chat-voice-conversation__captions):focus-visible { outline: 2px solid var(--studio-chatbot-accent-strong); outline-offset: 4px; }
.studio-chatbot .chat-voice-conversation__captions { flex-shrink: 0; max-height: min(140px, 22dvh); }
.studio-chatbot .chat-voice-conversation__wave { flex-shrink: 0; }

/* One native horizontal shortcut row, shared by studio and embedded chats.
   The shortcuts prefill the input, so the row is quiet and sits right above
   it; the greeting keeps the centre of the space that is left. */
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .chat-shell__welcome-frame:has(.chat-shell__welcome-shortcuts) { flex: 1 0 auto; margin: 0; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .chat-shell__welcome-frame:has(.chat-shell__welcome-shortcuts) > .article-chat-modal__intro { margin-block: auto; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .chat-shell__welcome-shortcuts { width: calc(100% + 16px); max-width: none; margin: 16px -8px -16px; }
.studio-chatbot .chat-shell__welcome-shortcuts-track { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 4px 8px 2px; scroll-padding-inline: 8px; overscroll-behavior-inline: contain; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, transparent, #000 8px, #000 calc(100% - 20px), transparent); mask-image: linear-gradient(to right, transparent, #000 8px, #000 calc(100% - 20px), transparent); }
.studio-chatbot .chat-shell__welcome-shortcuts-track::-webkit-scrollbar { display: none; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .chat-shell__welcome-shortcuts-track :is(.article-chat-modal__suggestions, .chat-shell__welcome-cta-shell) { display: contents; }
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .chat-shell__welcome-shortcuts-track :is(.studio-chatbot__welcome-question, .studio-chatbot__welcome-booking-cta) { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: auto; min-width: max-content; min-height: 34px; height: 34px; margin: 0; padding: 6px 12px; border: 1px solid transparent; border-radius: 17px; background: var(--joyce-soft); color: var(--joyce-muted); font: inherit; font-size: 13px; font-weight: 400; line-height: 20px; white-space: nowrap; text-decoration: none; box-shadow: none; transform: none; }
@media (hover: hover) {
  :is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .chat-shell__welcome-shortcuts-track :is(.studio-chatbot__welcome-question, .studio-chatbot__welcome-booking-cta):hover { border-color: var(--joyce-line); background: var(--joyce-soft); color: var(--joyce-accent); text-decoration: none; transform: none; }
}
.studio-chatbot .chat-shell__welcome-shortcuts-track .studio-chatbot__welcome-booking-cta svg { display: none; }

.studio-chatbot .chat-voice-conversation__captions { text-align: center; color: #2a2622; text-wrap: balance; }
.studio-chatbot .chat-voice-conversation__caption-rest { visibility: hidden; }
/* Always two lines: a one-line page leaves the second empty instead of
   resizing the caption box. Pages hold at most 52 characters. */
.studio-chatbot .chat-voice-conversation__captions { box-sizing: border-box; height: calc(2 * 28px + 8px); max-height: none; }
@media (prefers-reduced-motion: no-preference) {
  .studio-chatbot .chat-voice-conversation__captions .studio-chatbot__stream-fragment { animation: joyce-stream-fragment-wave 240ms cubic-bezier(0.16, 1, 0.3, 1) both; }
}

/* Touch and pointer feedback for the newer controls, in the motion language
   the JOYCE embed already uses for messages and header buttons: a small lift
   on hover, a quick give on press, transform only. */
@media (prefers-reduced-motion: no-preference) {
  .studio-chatbot :is(.chat-voice-launch--text, .chat-voice-conversation__action, .chat-voice-conversation__back, .chat-shell__welcome-shortcuts-track :is(.studio-chatbot__welcome-question, .studio-chatbot__welcome-booking-cta)) {
    transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1), background-color 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 260ms cubic-bezier(0.16, 1, 0.3, 1);
  }
  @media (hover: hover) {
    .studio-chatbot :is(.chat-voice-launch--text, .chat-voice-conversation__controls .chat-voice-conversation__action):hover { transform: translate3d(0, -1px, 0); box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--studio-chatbot-accent-strong) 45%, transparent); }
  }
  .studio-chatbot :is(.chat-voice-launch--text, .chat-voice-conversation__controls .chat-voice-conversation__action, .chat-shell__welcome-shortcuts-track :is(.studio-chatbot__welcome-question, .studio-chatbot__welcome-booking-cta)):active { transform: scale(0.97); box-shadow: none; transition-duration: 90ms; }
  .studio-chatbot .chat-voice-conversation__top .chat-voice-conversation__back:active { transform: scale(0.96); transition-duration: 90ms; }
  .studio-chatbot .chat-voice-conversation__back svg { transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1); }
  @media (hover: hover) {
    .studio-chatbot .chat-voice-conversation__back:hover svg { transform: translate3d(-2px, 0, 0); }
  }
  .studio-chatbot .chat-voice-launch--text svg { transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1); }
  @media (hover: hover) {
    .studio-chatbot .chat-voice-launch--text:hover svg { transform: scale(1.12); }
  }
  .studio-chatbot .studio-chatbot__bubble:active { transform: scale(0.985); transition-duration: 90ms; }
  .studio-chatbot .studio-chatbot__bubble:active .studio-chatbot__bubble-send { transform: scale(0.94); }
  .studio-chatbot[data-composer-style="compact"] .studio-chatbot__header-actions > .studio-chatbot__header-btn:last-child svg { transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1), background-color 180ms ease; }
  .studio-chatbot[data-composer-style="compact"] .studio-chatbot__header-actions > .studio-chatbot__header-btn:last-child:active svg { transform: scale(0.9); }

  /* Voice states hand over instead of snapping: each new status line rises in.
     Three names, so every step of listening, answering and speaking restarts it. */
  .studio-chatbot .chat-voice-conversation:is([data-live-phase="listening"], [data-live-phase="remote"]) :is([role="status"], .chat-voice-conversation__hint) { animation: studio-chatbot-voice-status-a 320ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .studio-chatbot .chat-voice-conversation:is([data-live-phase="responding"], [data-live-phase="connecting"], [data-live-phase="standby"]) :is([role="status"], .chat-voice-conversation__hint) { animation: studio-chatbot-voice-status-b 320ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .studio-chatbot .chat-voice-conversation:is([data-live-phase="speaking"], [data-live-phase="paused"], [data-live-phase="error"]) :is([role="status"], .chat-voice-conversation__hint) { animation: studio-chatbot-voice-status-c 320ms cubic-bezier(0.16, 1, 0.3, 1) both; }
}
@keyframes studio-chatbot-voice-status-a { from { opacity: 0; transform: translate3d(0, 6px, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
@keyframes studio-chatbot-voice-status-b { from { opacity: 0; transform: translate3d(0, 6px, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
@keyframes studio-chatbot-voice-status-c { from { opacity: 0; transform: translate3d(0, 6px, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }

/* Voice screen, every state: the status is the headline, the hint supports it,
   the busy ring sits inside the centred line, and only an action that moves
   the conversation forward is filled; stopping or interrupting stays quiet. */
.studio-chatbot .chat-voice-conversation__top { margin-left: -6px; }
.studio-chatbot .chat-voice-conversation [role="status"] { max-width: 24ch; font-size: 20px; font-weight: 600; line-height: 28px; text-wrap: balance; }
.studio-chatbot .chat-voice-conversation__hint { max-width: 32ch; text-wrap: balance; }
.studio-chatbot .chat-voice-conversation[data-phase="waiting"] [role="status"]::before { position: static; display: inline-block; box-sizing: border-box; margin-right: 8px; vertical-align: -1px; }
.studio-chatbot .chat-voice-conversation[data-live-phase="error"] [role="status"] { color: #a4470f; }
.studio-chatbot .chat-voice-conversation__controls .chat-voice-conversation__action { transition: background-color 180ms ease, color 180ms ease; }
.studio-chatbot .chat-voice-conversation:is([data-live-phase="connecting"], [data-live-phase="responding"], [data-live-phase="speaking"]) .chat-voice-conversation__controls .chat-voice-conversation__action {
  background: color-mix(in srgb, var(--studio-chatbot-accent-strong) 8%, #fff);
  color: color-mix(in srgb, var(--studio-chatbot-accent-strong) 85%, #000);
}
@media (prefers-reduced-motion: reduce) {
  .studio-chatbot .chat-voice-conversation__controls .chat-voice-conversation__action { transition: none; }
}

/* Reason picker: one quiet card, options read as soft chips, not boxed fields. */
.studio-chatbot__feedback-reason-picker {
  padding: 14px;
  border-color: rgba(5, 25, 40, 0.08);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(5, 25, 40, 0.06), 0 12px 28px rgba(5, 25, 40, 0.12);
}

.studio-chatbot__feedback-reason-title {
  font-weight: 600;
  letter-spacing: 0;
}

.studio-chatbot__feedback-reason-option {
  border-color: transparent;
  border-radius: 12px;
  background: var(--joyce-soft, #F2F5F7);
  font-weight: 500;
}

@media (hover: hover) {
  .studio-chatbot__feedback-reason-option:hover,
  .studio-chatbot__feedback-reason-option:focus-visible {
    border-color: transparent;
    background: #E6EEF3;
  }
}

/* A dictation status sits above the composer; the prefill chips make room for it. */
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__window:has(.studio-chatbot__voice-feedback span:not(:empty)) .chat-shell__welcome-shortcuts {
  margin-bottom: 14px;
}

/* Rating buttons take the widget accent, never the orange fallback. */
@media (hover: hover) {
  .studio-chatbot__answer-feedback button:hover,
  .studio-chatbot__answer-feedback button:focus-visible {
    border-color: var(--studio-chatbot-accent, #003C65);
    color: var(--studio-chatbot-accent, #003C65);
  }
}

/* Failed answer: plain explanation in the assistant's voice, one quiet retry button. */
:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__message-bubble--error.studio-chatbot__message-bubble--retry {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 0;
  background: transparent;
  color: #4A5560;
}

:is(.article-chat-modal[data-presentation="floating"], .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window) .studio-chatbot__message-bubble--error.studio-chatbot__message-bubble--retry .studio-chatbot__message-text {
  background: transparent;
  color: #4A5560;
}

.studio-chatbot__retry-bubble {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px 0 12px;
  border: 1px solid rgba(5, 25, 40, 0.14);
  border-radius: 999px;
  background: #fff;
  color: #263D4C;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.studio-chatbot__retry-bubble svg {
  width: 16px;
  height: 16px;
}

@media (hover: hover) {
  .studio-chatbot__retry-bubble:hover {
    border-color: rgba(5, 25, 40, 0.22);
    background: var(--joyce-soft, #F2F5F7);
  }
}

.studio-chatbot__message--error .studio-chatbot__message-copy {
  display: none;
}

/* Header: icons carry enough contrast to read as controls, round hover targets,
   and the bar only separates from the thread once content scrolls beneath it. */
.studio-chatbot[data-composer-style="compact"] .studio-chatbot__window .studio-chatbot__header-btn {
  border-radius: 50%;
  color: #4A5560;
}

@media (hover: hover) {
  .studio-chatbot[data-composer-style="compact"] .studio-chatbot__window .studio-chatbot__header-btn:hover {
    color: #1D2A33;
  }
}

.studio-chatbot[data-composer-style="compact"] .studio-chatbot__window .chat-voice-launch--header svg {
  width: 22px;
  height: 22px;
}

.studio-chatbot[data-composer-style="compact"] .studio-chatbot__header-title {
  letter-spacing: 0;
}

@media (min-width: 768px) {
  .studio-chatbot[data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__window .studio-chatbot__header::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    height: 20px;
    background: linear-gradient(#fff, rgb(255 255 255 / 0%));
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  .studio-chatbot[data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__window[data-scrolled] .studio-chatbot__header::after {
    opacity: 1;
  }
}

/* A quick second tap must never zoom the host page; panning and pinch stay available. */
.studio-chatbot,
.studio-chatbot * {
  touch-action: manipulation;
}

/* Phone sheet with the keyboard up: it follows the visible viewport instead of
   the layout viewport, which Safari scrolls away under the status bar. The top
   bar stays at the top of what is visible and the input sits directly above
   the keyboard, as in a native sheet. The widget sets data-sheet-keyboard and
   the two measurements from window.visualViewport. */
@media (max-width: 767px) {
  .studio-chatbot[data-sheet-keyboard][data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__window {
    --studio-chatbot-keyboard-offset: 0px !important;
    position: fixed;
    top: calc(var(--studio-chatbot-sheet-top, 0px) + 10px);
    right: 0;
    bottom: auto;
    left: 0;
    height: calc(var(--studio-chatbot-sheet-height, 100dvh) - 10px);
    max-height: none;
    /* Safari's keyboard bar is translucent: the sheet continues behind it
       instead of letting the dimmed page show through. */
    box-shadow: 0 240px 0 #fff;
  }
  /* Typing into the empty chat: the voice button steps aside and the welcome
     tightens, so greeting, suggestions and input fit above the keyboard. */
  .studio-chatbot[data-sheet-keyboard][data-composer-style="compact"].chat-shell--greeting .article-chat-modal__intro .chat-voice-launch { display: none; }
  .studio-chatbot[data-sheet-keyboard][data-composer-style="compact"].chat-shell--greeting .article-chat-modal__intro { gap: 10px; }
  .studio-chatbot[data-sheet-keyboard][data-composer-style="compact"].chat-shell--greeting .article-chat-modal__presence { width: 64px; height: 64px; margin-bottom: 4px; }
  .studio-chatbot[data-sheet-keyboard][data-composer-style="compact"].chat-shell--greeting .studio-chatbot__welcome-title { font-size: 24px; line-height: 30px; }
  .studio-chatbot[data-sheet-keyboard][data-composer-style="compact"].chat-shell--greeting .studio-chatbot__messages { scrollbar-width: none; }
  .studio-chatbot[data-sheet-keyboard][data-composer-style="compact"].chat-shell--greeting .studio-chatbot__messages::-webkit-scrollbar { display: none; }
  /* Safari floats its address pill just below the page's bottom edge while the
     keyboard is up; this margin keeps the input clear of it. */
  .studio-chatbot[data-sheet-keyboard][data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__input-area {
    padding-bottom: 22px !important;
  }
}

/* Phone sheet, the native details from Apple's sheet guidance: a grabber at
   the top edge, the larger corner radius of current iOS sheets, and a top bar
   that starts below the grabber. */
@media (max-width: 767px) {
  .studio-chatbot[data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__window {
    border-radius: 32px 32px 0 0;
  }
  /* The grabber: the bar is the ::before, the element around it is the tap
     and drag target. A tap switches between the two heights. */
  .studio-chatbot[data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__window > .studio-chatbot__sheet-handle {
    display: block;
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 3;
    width: 96px;
    height: 20px;
    margin-left: -48px;
    padding: 0;
    background: transparent;
    cursor: pointer;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
  }
  .studio-chatbot[data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__window > .studio-chatbot__sheet-handle::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 30px;
    width: 36px;
    height: 5px;
    border-radius: 3px;
    background: rgb(60 60 67 / 30%);
  }
  .studio-chatbot[data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__window .studio-chatbot__header {
    min-height: 64px;
    padding-top: 16px !important;
  }
  .studio-chatbot[data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__header-actions { top: 10px; }
  /* Empty chat: only Close sits in the bar, so the title block gets the room. */
  .studio-chatbot.chat-shell--greeting[data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__header-left { max-width: calc(100% - 112px); }
}

/* Phone launcher: browsers cut whatever is painted below the page's bottom
   edge, so the bar sits higher and its glow stays within that margin. The glow
   is still on phones: an animated box-shadow repaints every frame and halved
   the frame rate of the whole page on a mid-range Android. The turning border
   stays, but as a gradient disc that rotates behind a white fill: a rotation
   is played by the compositor, while turning the gradient's start angle
   redrew the bar and its blurred shadows on every frame, which kept the
   phone's GPU too busy to move the sheet at full frame rate. */
@media (max-width: 767px) {
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__bubble {
    bottom: calc(28px + env(safe-area-inset-bottom));
    box-shadow:
      0 6px 16px rgba(5, 25, 40, 0.14),
      -12px -9px 32px rgba(244, 63, 94, 0.16),
      14px -6px 34px rgba(59, 130, 246, 0.18),
      9px 4px 19px rgba(20, 184, 166, 0.14),
      -9px 4px 19px rgba(245, 158, 11, 0.12);
    animation: none !important;
    filter: none !important;
    border: 0;
    padding: 0 11.5px 0 13.5px;
    background: none;
    isolation: isolate;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }
  /* Showing and hiding is played by the sheet motion in the widget. A style
     transition underneath it would run on the same properties and keep the
     browser from handing the motion to the compositor. */
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__bubble--hidden { transform: none; transition: none; }
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__bubble::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: -2;
    width: 112%;
    aspect-ratio: 1;
    pointer-events: none;
    background: conic-gradient(
      rgba(245, 158, 11, 0.76) 0%,
      rgba(244, 63, 94, 0.78) 18%,
      rgba(168, 85, 247, 0.82) 36%,
      rgba(59, 130, 246, 0.84) 55%,
      rgba(20, 184, 166, 0.78) 74%,
      rgba(132, 204, 22, 0.72) 88%,
      rgba(245, 158, 11, 0.76) 100%
    );
    transform: translate(-50%, -50%);
    animation: joyce-ring-turn 8s linear infinite;
  }
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__bubble::after {
    display: block;
    inset: 1.5px;
    z-index: -1;
    border-radius: 999px;
    background: #fff;
    opacity: 1;
    animation: none;
    transition: none;
  }
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__bubble--hidden::before { animation-play-state: paused; }
  /* The sheet does not clip its content on phones. Nothing in it paints into
     the rounded corners, and a rounded clip around the scrolling and animated
     layers inside makes the GPU draw the whole sheet into an extra buffer on
     every frame it moves: that alone cost about half the dropped frames on a
     mid-range Android. */
  .studio-chatbot[data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__window { overflow: visible; }
  /* The sheet has no border on phones, so nothing of the turn would show. */
  .studio-chatbot[data-theme="injoy-blue"][data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__window { animation: none; }
}
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .studio-chatbot[data-theme="injoy-blue"] .studio-chatbot__bubble::before { animation: none; }
}

@keyframes joyce-ring-turn {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Phone sheet backdrop. The dimming is a layer of its own (the scrim), so it
   fades and follows a drag on opacity alone while the sheet stays solid, as a
   native sheet does. No blur: the sheet covers all but a strip of the page, so
   blurring what is behind it costs frames and shows nothing. */
.studio-chatbot__scrim { display: none; }
@media (max-width: 767px) {
  .studio-chatbot[data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__overlay {
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .studio-chatbot[data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__scrim {
    display: block;
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgb(30 36 40 / 20%);
  }
  .studio-chatbot[data-theme="injoy-blue"][data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__scrim {
    background: rgba(7, 23, 34, 0.44);
  }
}

/* Phone sheet at medium height (iOS medium detent): the empty chat opens about
   half the screen high and floats clear of the screen edges with all four
   corners rounded, as partial-height sheets do in iOS 26. At full height it
   meets the edges. The widget animates the change between the two on
   transforms (see _morphSheetDetent); nothing here transitions the box. */
@media (max-width: 767px) {
  .studio-chatbot[data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__window {
    width: 100vw;
    height: calc(100dvh - 10px);
    margin: 0;
  }
  .studio-chatbot[data-sheet-detent="medium"][data-composer-style="compact"]:not([data-voice-window]):not([data-sheet-keyboard]) .studio-chatbot__window {
    width: calc(100vw - 16px);
    height: max(416px, 47dvh);
    margin: 0 8px calc(8px + env(safe-area-inset-bottom));
    border-radius: 32px;
  }
  /* Medium height shows only what starts a conversation: greeting, speak,
     suggestions, input. Launcher, speak button and input already name JOYCE,
     so the title block waits for full height; Close and the drag area stay. */
  .studio-chatbot[data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__header-left { transition: opacity 220ms ease; }
  .studio-chatbot[data-sheet-heading="medium"][data-composer-style="compact"]:not([data-voice-window]):not([data-sheet-keyboard]) .studio-chatbot__header-left { opacity: 0; pointer-events: none; animation: none !important; }
  .studio-chatbot[data-sheet-detent="medium"][data-composer-style="compact"]:not([data-voice-window]):not([data-sheet-keyboard]) .studio-chatbot__window .studio-chatbot__header { min-height: 48px; margin-bottom: -28px; }
  /* The sheet does not clip (see the phone launcher block), so the one piece
     with its own fill follows the floating sheet's lower corners itself. */
  .studio-chatbot[data-sheet-detent="medium"][data-composer-style="compact"]:not([data-voice-window]):not([data-sheet-keyboard]) .studio-chatbot__window .studio-chatbot__input-area { border-radius: 0 0 32px 32px; }
  .studio-chatbot[data-sheet-detent="medium"][data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__messages { scrollbar-width: none; }
  .studio-chatbot[data-sheet-detent="medium"][data-composer-style="compact"]:not([data-voice-window]) .studio-chatbot__messages::-webkit-scrollbar { display: none; }
  .studio-chatbot[data-sheet-detent="medium"][data-composer-style="compact"]:not([data-voice-window]):not([data-sheet-keyboard]) .article-chat-modal__presence { width: 72px; height: 72px; margin-bottom: 4px; }
}

/* Touch: a tap leaves no trace on a control. Browsers flash a translucent box
   over whatever is tapped, and after typing on the on-screen keyboard they
   treat focus moved by the widget (to the launcher after closing, to the next
   voice button) as keyboard focus and draw the focus frame around it. On a
   phone both read as a stray border. This holds for every control in the chat:
   buttons, links, chips, pills and text fields. Pointer devices keep every
   focus ring. */
.studio-chatbot,
.studio-chatbot * { -webkit-tap-highlight-color: transparent; }
@media (hover: none) and (pointer: coarse) {
  .studio-chatbot :is(:focus, :focus-visible) { outline: none !important; }
}

/* Action pill row: the row fades its own content at a scrollable edge instead
   of laying a white box over it. A box has edges, and they cut straight
   through the soft pill shadows. The fade elements stay in the DOM because the
   widget toggles their hidden class to say which edge can scroll. */
.studio-chatbot .studio-chatbot__followup-fade { background: none !important; }
.studio-chatbot__followup-pills { --followup-fade-start: 0px; --followup-fade-end: 0px; }
.studio-chatbot__followup-pills:has(> .studio-chatbot__followup-fade--start:not(.studio-chatbot__followup-fade--hidden)) { --followup-fade-start: 56px; }
.studio-chatbot__followup-pills:has(> .studio-chatbot__followup-fade--end:not(.studio-chatbot__followup-fade--hidden)) { --followup-fade-end: 56px; }
.studio-chatbot__followup-pills:has(> .studio-chatbot__followup-fade:not(.studio-chatbot__followup-fade--hidden)) > .studio-chatbot__followup-scroll {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--followup-fade-start), #000 calc(100% - var(--followup-fade-end)), transparent);
  mask-image: linear-gradient(to right, transparent, #000 var(--followup-fade-start), #000 calc(100% - var(--followup-fade-end)), transparent);
}
