/* The Feed keeps its video clear until the Bito avatar is tapped. */
body #page-home.page.active:not(.home-agent-sheet-open) #home-bottom-area.home-bottom-area {
  display: none !important;
  pointer-events: none !important;
}
body #page-home.page.active:not(.home-agent-sheet-open) .home-main {
  padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)) !important;
}
body:not(.bito-feed-active) #page-home.page.active[data-home-conversation-state="collapsed"]:not(.home-agent-sheet-open) .home-main {
  grid-template-rows: minmax(0, 1fr) !important;
}
body:not(.bito-feed-active) #page-home.page.active[data-home-conversation-state="collapsed"]:not(.home-agent-sheet-open) .home-main > #home-bottom-area.home-bottom-area {
  display: none !important;
}
body #page-home #home-floating-ai {
  position: fixed !important;
  z-index: 90 !important;
  right: 16px;
  bottom: calc(176px + env(safe-area-inset-bottom, 0px));
  display: grid !important;
  place-items: center !important;
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  min-height: 52px !important;
  padding: 3px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: grab !important;
  touch-action: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  transition: left 220ms cubic-bezier(.2,.8,.2,1), top 220ms cubic-bezier(.2,.8,.2,1) !important;
}
body #page-home #home-floating-ai.is-auto-positioned {
  transition:none!important;
}
body #page-home #home-floating-ai > img {
  display: block !important;
  width: 46px !important;
  height: 46px !important;
  border: 1px solid rgba(255,255,255,.94) !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  box-shadow: 0 0 0 1px rgba(255,115,56,.72), 0 4px 12px rgba(0,0,0,.3) !important;
  pointer-events: none !important;
}
body #page-home #home-floating-ai.is-entering > img {
  animation: homeFloatingAiEnter 560ms cubic-bezier(.2,.8,.2,1) both;
}
body #page-home #home-floating-ai:active > img { transform:scale(.94); }
body #page-home #home-floating-ai .home-floating-ai-spark {
  position: absolute;
  top: 0;
  right: 0;
  width: 9px;
  height: 9px;
  background: #ff9a42;
  clip-path: polygon(50% 0,61% 36%,100% 50%,61% 62%,50% 100%,38% 62%,0 50%,38% 36%);
  opacity:.72;
  pointer-events: none;
}
body #page-home #home-floating-ai .home-floating-ai-tip {
  position:absolute;
  right:calc(100% + 10px);
  top:-8px;
  width:168px;
  padding:9px 11px;
  border:1px solid rgba(255,255,255,.74);
  border-radius:15px;
  background:rgba(255,255,255,.96);
  color:#17191c;
  box-shadow:0 8px 24px rgba(0,0,0,.23);
  font-size:12px;
  font-weight:600;
  line-height:1.35;
  text-align:left;
  opacity:0;
  visibility:hidden;
  transform:translateX(8px) scale(.96);
  transition:opacity 220ms ease,transform 220ms ease,visibility 220ms ease;
  pointer-events:none;
}
body #page-home #home-floating-ai.is-on-left .home-floating-ai-tip { right:auto; left:calc(100% + 10px); transform:translateX(-8px) scale(.96); }
body #page-home #home-floating-ai.is-tip-visible .home-floating-ai-tip { opacity:1; visibility:visible; transform:none; }
body #page-home #home-floating-ai.is-dragging {
  cursor: grabbing !important;
  transition: none !important;
}
body #page-home #home-floating-ai.is-dragging > img { animation: none !important; transform: scale(1.04); box-shadow:0 0 0 2px #ff7338, 0 8px 20px rgba(0,0,0,.4)!important; }
body #page-home #home-floating-ai:focus-visible {
  outline: 3px solid #fff !important;
  outline-offset: 5px !important;
}
body #page-home.home-agent-sheet-open #home-floating-ai { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }
@keyframes homeFloatingAiEnter { from { opacity:0; transform:translateY(5px) scale(.88); } to { opacity:1; transform:none; } }
body #page-home:not(.home-agent-sheet-open) .home-recommendation-unit.is-active .home-example-primary-actions {
  opacity: 1 !important;
  transform: none !important;
}
body:not(.bito-feed-active) #page-home.page.active[data-home-conversation-state]:not(.home-agent-sheet-open) .home-main .home-discovery .home-recommendation-unit.is-active .home-example-primary-actions{
  bottom:calc(180px + env(safe-area-inset-bottom,0px))!important;
}

/* Welcome reuses the existing dark conversation, header, history and disclaimer. */
body:not(.home-inline-keyboard-open):not(.bw-keyboard-open) #page-home.page.active[data-home-agent-stage="welcome"][data-home-conversation-state="expanded"].home-agent-sheet-open .home-main > #home-bottom-area.home-bottom-area {
  height: 89dvh !important;
  min-height: 89dvh !important;
  max-height: 89dvh !important;
  border-radius: 24px 24px 0 0 !important;
  background: #18191c !important;
  box-shadow: 0 -12px 30px rgba(0,0,0,.28) !important;
  animation: homeFeedAiSlideIn 270ms cubic-bezier(.2,.8,.2,1) both;
}
@keyframes homeFeedAiSlideIn {
  from { translate: 0 100%; opacity: .7; }
  to { translate: 0 0; opacity: 1; }
}
#page-home[data-home-agent-stage="welcome"].home-agent-sheet-open #home-agent-panel .home-agent-conversation,
#page-home[data-home-agent-stage="welcome"].home-agent-sheet-open #home-agent-panel .home-agent-answer-card {
  display: none !important;
}
#page-home[data-home-agent-stage="welcome"].home-agent-sheet-open #home-agent-panel .home-agent-thread {
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
}
#page-home .home-agent-welcome[hidden],
#page-home.home-agent-history-page-open .home-agent-welcome { display: none !important; }
#page-home[data-home-agent-stage="welcome"].home-agent-sheet-open .home-agent-welcome {
  display: block !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 16px 2px 2px !important;
  overflow-y: auto !important;
}
#page-home .home-agent-sheet-avatar,
#page-home .home-agent-composer>img { flex:none; border:2px solid #fff!important; border-radius:50%!important; background:#fff!important; box-shadow:0 0 0 1.5px #ff7338!important; object-fit:cover!important; }
@media (max-height: 680px) {
  #page-home[data-home-agent-stage="welcome"].home-agent-sheet-open .home-agent-welcome { padding-top:10px!important; }
}
@media (prefers-reduced-motion: reduce) {
  body #page-home #home-floating-ai, body #page-home #home-floating-ai > img, body #page-home #home-floating-ai .home-floating-ai-spark { transition: none !important; animation: none !important; }
  body #page-home[data-home-agent-stage="welcome"].home-agent-sheet-open #home-bottom-area { animation: none !important; }
}

#page-home .home-agent-composer .home-control-send {
  display:grid;
  place-items:center;
  flex:0 0 44px;
  width:44px;
  height:44px;
  padding:0;
  border:1px solid #db8359;
  border-radius:50%;
  background:rgba(196,120,74,.21);
  color:#efe6e1;
}
#page-home .home-agent-composer .home-control-send svg {
  width:22px;
  height:22px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
#page-home .home-agent-composer .home-control-send:disabled { opacity:.55; }

/* Recommendation conversations use the tall, dark Bito sheet shown after a question. */
#page-home.home-agent-sheet-open #home-agent-panel .home-agent-header-actions {
  grid-column:2 !important;
  justify-self:end !important;
  margin-left:auto !important;
}
#page-home[data-home-conversation-state="expanded"][data-home-agent-stage].home-agent-sheet-open #home-agent-panel .home-agent-drawer-header {
  grid-template-columns:minmax(0,1fr) 88px!important;
  padding-left:14px!important;
  padding-right:8px!important;
}
#page-home[data-home-conversation-state="expanded"][data-home-agent-stage].home-agent-sheet-open #home-agent-panel .home-agent-drawer-identity {
  display:flex!important;
  grid-template-columns:none!important;
  align-items:center!important;
  gap:10px!important;
  min-width:0!important;
}
#page-home[data-home-conversation-state="expanded"][data-home-agent-stage].home-agent-sheet-open #home-agent-panel .home-agent-drawer-identity>img {
  flex:0 0 42px!important;
  width:42px!important;
  height:42px!important;
  border:1px solid rgba(255,255,255,.9)!important;
  border-radius:11px!important;
  background:#fff!important;
  object-fit:cover!important;
  opacity:1!important;
}
#page-home[data-home-conversation-state="expanded"][data-home-agent-stage].home-agent-sheet-open #home-agent-panel .home-agent-drawer-identity strong {
  color:#f7f7f8!important;
  font-size:22px!important;
  font-weight:750!important;
  line-height:1.1!important;
}
#page-home[data-home-conversation-state="expanded"][data-home-agent-stage].home-agent-sheet-open #home-agent-panel .home-agent-drawer-identity strong::after { content:none!important; }
body.home-inline-keyboard-open #page-home.page.active[data-home-conversation-state="expanded"].home-agent-sheet-open .home-main > #home-bottom-area.home-bottom-area,
body.bw-keyboard-open #page-home.page.active[data-home-conversation-state="expanded"].home-agent-sheet-open .home-main > #home-bottom-area.home-bottom-area {
  height:calc(var(--home-viewport-height,100dvh) * .89) !important;
  min-height:0 !important;
  max-height:calc(var(--home-viewport-height,100dvh) - 12px) !important;
}
body:not(.home-inline-keyboard-open):not(.bw-keyboard-open) #page-home.page.active[data-home-agent-stage="chat"][data-home-conversation-state="expanded"].home-agent-sheet-open .home-main > #home-bottom-area.home-bottom-area {
  height:89dvh !important;
  min-height:89dvh !important;
  max-height:89dvh !important;
  border-radius:24px 24px 0 0 !important;
  background:#18191c !important;
  box-shadow:0 -12px 30px rgba(0,0,0,.28) !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}
#page-home[data-home-agent-stage="chat"].home-agent-sheet-open #home-agent-panel {
  height:100% !important;
  min-height:0 !important;
  max-height:none !important;
  padding:0 12px max(10px,env(safe-area-inset-bottom,0px)) !important;
  background:#18191c !important;
}
#page-home[data-home-agent-stage="chat"].home-agent-sheet-open #home-agent-panel :is(.home-agent-drawer-header,.home-agent-conversation,.home-agent-answer-card,.home-agent-thread,.home-agent-results) {
  background:#18191c !important;
}
#page-home[data-home-agent-stage="chat"].home-agent-sheet-open #home-agent-panel .home-agent-drawer-identity strong {
  font-size:20px !important;
  font-weight:700 !important;
  color:#f7f7f8 !important;
}
#page-home[data-home-agent-stage="chat"].home-agent-sheet-open #home-agent-panel .home-agent-drawer-identity strong::after {
  content:none !important;
}
#page-home[data-home-agent-stage="chat"].home-agent-sheet-open #home-agent-panel .home-agent-conversation,
#page-home[data-home-agent-stage="chat"].home-agent-sheet-open #home-agent-panel .home-agent-answer-card {
  display:flex !important;
  flex:1 1 auto !important;
  flex-direction:column !important;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
}
#page-home[data-home-agent-stage="chat"].home-agent-sheet-open #home-agent-panel .home-agent-answer-card {
  overflow-x:hidden !important;
  overflow-y:auto !important;
  padding:12px 2px 16px !important;
}
#page-home[data-home-agent-stage="chat"].home-agent-sheet-open #home-agent-panel .home-agent-thread {
  flex:0 0 auto !important;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  overflow:visible !important;
  gap:10px !important;
}
#page-home[data-home-agent-stage="chat"].home-agent-sheet-open #home-agent-panel .home-agent-thread-turn.is-assistant.has-recommendations {
  align-self:stretch !important;
  display:flex !important;
  flex-direction:column !important;
  gap:12px !important;
  width:100% !important;
  max-width:100% !important;
  padding:14px !important;
  border:1px solid rgba(190,119,82,.38) !important;
  border-radius:18px !important;
  background:#2b211e !important;
  color:#f3efeb !important;
  box-sizing:border-box !important;
}
#page-home[data-home-agent-stage="chat"].home-agent-sheet-open #home-agent-panel .home-agent-thread-turn.is-assistant.has-recommendations .home-agent-turn-copy {
  font-size:15px !important;
  line-height:1.55 !important;
}
#page-home[data-home-agent-stage="chat"].home-agent-sheet-open #home-agent-panel .home-agent-thread-turn.is-user {
  border:1px solid rgba(190,119,82,.45) !important;
  background:#4b3027 !important;
}
#page-home[data-home-agent-stage="chat"].home-agent-sheet-open #home-agent-panel .bito-proactive-recommendation {
  width:100% !important;
  margin:0 !important;
  padding:0 !important;
}
#page-home[data-home-agent-stage="chat"].home-agent-sheet-open #home-agent-panel .bito-proactive-recommendation-header {
  display:none !important;
}
#page-home[data-home-agent-stage="chat"].home-agent-sheet-open #home-agent-panel .bito-proactive-recommendation .home-agent-history-videos {
  grid-auto-columns:112px !important;
  gap:8px !important;
  padding-bottom:2px !important;
}
#page-home[data-home-agent-stage="chat"].home-agent-sheet-open #home-agent-panel .bito-proactive-recommendation .home-agent-history-video {
  width:112px !important;
  min-width:112px !important;
  background:#1c1d21 !important;
}
#page-home[data-home-agent-stage="chat"].home-agent-sheet-open #home-agent-panel .bito-proactive-recommendation .home-agent-history-video-play {
  display:none !important;
}
#page-home[data-home-agent-stage="chat"].home-agent-sheet-open #home-agent-panel .bito-answer-feedback {
  align-self:flex-start !important;
  margin:0 0 14px !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
}
#page-home[data-home-agent-stage="chat"].home-agent-sheet-open #home-agent-panel .bito-answer-feedback-prompt {
  display:none !important;
}
#page-home[data-home-agent-stage="chat"].home-agent-sheet-open #home-agent-panel .bito-answer-feedback-votes > button {
  width:44px !important;
  height:44px !important;
  min-width:44px !important;
  min-height:44px !important;
  color:rgba(255,255,255,.48) !important;
}
#page-home[data-home-agent-stage="chat"].home-agent-sheet-open #home-agent-panel .home-agent-composer {
  display:flex !important;
  align-items:center !important;
  gap:4px !important;
  flex:0 0 54px !important;
  height:54px !important;
  min-height:54px !important;
  margin:8px 0 0 !important;
  padding:5px 6px 5px 12px !important;
  border:1px solid rgba(189,115,79,.45) !important;
  border-radius:999px !important;
  background:#292427 !important;
}
#page-home[data-home-agent-stage="chat"].home-agent-sheet-open #home-agent-panel .home-control-mic {
  width:44px !important;
  height:44px !important;
  min-width:44px !important;
  min-height:44px !important;
  flex:0 0 44px !important;
  border:0 !important;
  background:transparent !important;
  color:#bdbabe !important;
}
#page-home[data-home-agent-stage="chat"].home-agent-sheet-open #home-agent-panel .home-control-send {
  display:grid !important;
  place-items:center !important;
  width:44px !important;
  height:44px !important;
  min-width:44px !important;
  min-height:44px !important;
  flex:0 0 44px !important;
  padding:0 !important;
  border:1px solid #db8359 !important;
  border-radius:50% !important;
  background:rgba(196,120,74,.21) !important;
  color:#efe6e1 !important;
  cursor:pointer !important;
}
#page-home[data-home-agent-stage="chat"].home-agent-sheet-open #home-agent-panel .home-control-send:disabled {
  opacity:.64 !important;
  cursor:default !important;
}
#page-home[data-home-agent-stage="chat"].home-agent-sheet-open #home-agent-panel .home-control-send svg {
  width:23px;
  height:23px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
#page-home[data-home-agent-stage="chat"].home-agent-sheet-open #home-agent-panel .home-control-send:focus-visible {
  outline:2px solid #fff !important;
  outline-offset:2px !important;
}
