/* Shared Dating and Roleplay chat controls. Keep both chat surfaces on this file. */
:root{--eap-chat-dialogue:#dfb46f;--eap-chat-topbar-h:64px}

/* Keep character dialogue identical across Dating and Roleplay. This rule is
   intentionally stronger than the legacy RP theme so the shared variable is
   the only color source that needs to change later. */
body.chat-v2-theme .main-char .chat-dialogue,
body.chat-v2-theme .chat-dialogue.chat-dialogue,
.ct-app .ct-bubble .chat-dialogue{
  color:var(--eap-chat-dialogue)!important;
}

.eap-chat-corner-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  box-sizing:border-box;
}
.eap-chat-corner-action{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  min-height:42px!important;
  flex:0 0 42px!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  border:1px solid rgba(255,255,255,.10)!important;
  border-radius:14px!important;
  background:rgba(13,13,25,.76)!important;
  -webkit-backdrop-filter:blur(14px);
  backdrop-filter:blur(14px);
  color:rgba(247,245,250,.74)!important;
  box-shadow:0 10px 25px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.035)!important;
  cursor:pointer!important;
  transition:background-color .16s ease,border-color .16s ease,color .16s ease,transform .16s ease!important;
}
.eap-chat-corner-action:hover{background:rgba(35,31,47,.92)!important;border-color:rgba(255,117,188,.28)!important;color:#fff!important;transform:translateY(-1px)}
.eap-chat-corner-action:active{transform:translateY(0)}
.eap-chat-corner-action:focus-visible{outline:2px solid rgba(255,86,177,.82)!important;outline-offset:2px}
.eap-chat-corner-action svg{width:21px!important;height:21px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important}
.eap-chat-corner-action span{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

/* The sidebar is shared by every chat surface. Keep the collapse control at
   Dating's normal brightness even when a legacy RP template adds an opacity
   rule later in its own inline stylesheet. */
body.chat-v2-theme .primary-sidebar .ps-collapse-btn,
.primary-sidebar .ps-collapse-btn{
  opacity:1!important;
  filter:none!important;
  visibility:visible!important;
}

/* Dating owns the first grid row. Roleplay gets the same reserved top area so
   its scene messages cannot scroll underneath the controls. */
.ct-chat-corner-actions.eap-chat-corner-actions{
  position:relative!important;
  grid-row:1!important;
  top:auto!important;
  right:auto!important;
  width:100%!important;
  padding:8px 28px!important;
  pointer-events:none;
}
.ct-chat-corner-actions.eap-chat-corner-actions .eap-chat-corner-action{pointer-events:auto}
.main-char .rp-chat-corner-actions.eap-chat-corner-actions{
  position:fixed!important;
  top:0!important;
  left:var(--ps-w,244px)!important;
  right:0!important;
  width:auto!important;
  height:var(--eap-chat-topbar-h)!important;
  padding:8px 28px!important;
  gap:8px!important;
  z-index:2001!important;
  pointer-events:none;
  background:transparent!important;
  background-image:none!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
.main-char .rp-chat-corner-actions.eap-chat-corner-actions .eap-chat-corner-action{pointer-events:auto}

/* Keep the message viewport below the shared top control area. The full
   message mode keeps its larger canvas while preserving the same safe zone. */
body.chat-v2-theme .main-char .main-char-message:not(.message-full){
  max-height:max(180px,calc(40vh - var(--eap-chat-topbar-h)))!important;
}
body.chat-v2-theme .main-char .main-char-message.message-full{
  max-height:max(240px,calc(70vh - var(--eap-chat-topbar-h)))!important;
}
body.chat-v2-theme.full-screen-mode .main-char .main-char-message{
  top:var(--eap-chat-topbar-h)!important;
  max-height:none!important;
}

.eap-chat-composer-shell{
  box-sizing:border-box!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
body.chat-v2-theme .main-char .main-char-input.rp-composer-enabled,
body.chat-v2-theme .main-char .main-char-input.rp-composer-enabled:focus-within,
body.chat-v2-theme .main-char .eap-chat-composer-shell{
  background:transparent!important;
  border-top-color:transparent!important;
  border-color:transparent!important;
  box-shadow:none!important;
}
.eap-chat-composer{
  box-sizing:border-box!important;
  width:min(100%,574px)!important;
  min-height:106px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:8px!important;
  padding:8px!important;
  border:1px solid rgba(255,255,255,.10)!important;
  border-radius:28px!important;
  background:rgba(36,36,36,.80)!important;
  box-shadow:0 16px 42px rgba(0,0,0,.34),0 0 0 1px rgba(255,255,255,.04),inset 0 1px 0 rgba(255,255,255,.035)!important;
  -webkit-backdrop-filter:blur(18px);
  backdrop-filter:blur(18px);
}
.eap-chat-composer:focus-within{
  border-color:rgba(255,255,255,.10)!important;
  background:rgba(36,36,36,.80)!important;
  box-shadow:0 16px 42px rgba(0,0,0,.34),0 0 0 1px rgba(255,255,255,.04),inset 0 1px 0 rgba(255,255,255,.035)!important;
}
.eap-chat-composer-input,
.eap-chat-composer-input:focus,
.eap-chat-composer-input:focus-visible{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  height:40px!important;
  min-height:40px!important;
  max-height:136px!important;
  flex:0 0 auto!important;
  box-sizing:border-box!important;
  margin:0!important;
  padding:8px 4px!important;
  border:0!important;
  border-width:0!important;
  border-style:none!important;
  border-color:transparent!important;
  border-radius:6px!important;
  outline:0!important;
  resize:none!important;
  background:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
  color:rgba(250,249,252,.96)!important;
  font-size:16px!important;
  line-height:24px!important;
  transition:none!important;
}
.eap-chat-composer-input::placeholder{color:rgba(255,255,255,.47)!important;opacity:1!important}
body.chat-v2-theme .main-char .rp-premium-composer #AskContent.eap-chat-composer-input,
body.chat-v2-theme .main-char .rp-premium-composer #AskContent.eap-chat-composer-input:focus,
body.chat-v2-theme .main-char .rp-premium-composer #AskContent.eap-chat-composer-input:focus-visible{
  border:0!important;
  border-width:0!important;
  border-style:none!important;
  border-color:transparent!important;
  outline:0!important;
  background:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
}
.eap-chat-composer-toolbar{width:100%!important;min-height:40px!important;display:flex!important;align-items:center!important;gap:8px!important;padding:0!important}
.eap-chat-mode-trigger,
.eap-chat-suggest-btn,
.eap-chat-send{
  box-sizing:border-box!important;
  flex:0 0 auto!important;
}
.eap-chat-mode-trigger{width:60px!important;min-width:60px!important;height:40px!important;min-height:40px!important;padding:0 9px!important;border-radius:999px!important;background:rgba(68,68,72,.88)!important;color:#fafafa!important}
.eap-chat-suggest-btn{width:40px!important;min-width:40px!important;height:40px!important;min-height:40px!important;padding:0!important;background:transparent!important;color:rgba(255,255,255,.54)!important}
.eap-chat-suggest-btn:hover:not(:disabled){background:rgba(255,255,255,.055)!important;color:#fff!important}
.eap-chat-send{width:40px!important;min-width:40px!important;height:40px!important;min-height:40px!important;padding:0!important;border-radius:50%!important}

@media(max-width:740px){
  :root{--eap-chat-topbar-h:58px}
  .ct-chat-corner-actions.eap-chat-corner-actions{padding:8px 15px!important}
  .main-char .rp-chat-corner-actions.eap-chat-corner-actions{left:0!important;right:0!important;top:0!important;padding:8px 15px!important;gap:8px!important}
  .eap-chat-corner-action{width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;flex-basis:38px!important;border-radius:12px!important}
  .eap-chat-corner-action svg{width:19px!important;height:19px!important}
  .eap-chat-composer-shell{padding:9px 10px 11px!important}
  .eap-chat-composer{min-height:104px!important;gap:6px!important;padding:8px!important;border-radius:26px!important}
  .eap-chat-composer-input,
  .eap-chat-composer-input:focus,
  .eap-chat-composer-input:focus-visible{height:40px!important;min-height:40px!important;padding:7px 4px!important}
  .eap-chat-composer-toolbar{gap:6px!important}
  .eap-chat-mode-trigger{width:58px!important;min-width:58px!important}
}
@media(max-height:650px) and (min-width:741px){
  :root{--eap-chat-topbar-h:58px}
}
@media(max-width:430px){
  .ct-chat-corner-actions.eap-chat-corner-actions{padding-left:10px!important;padding-right:10px!important}
  .main-char .rp-chat-corner-actions.eap-chat-corner-actions{padding-left:10px!important;padding-right:10px!important}
  .eap-chat-composer-shell{padding-left:8px!important;padding-right:8px!important}
  .eap-chat-composer{border-radius:24px!important}
}

/* Message tools stay readable over portraits and scene artwork. */
.ct-msg-actions button,
body.chat-v2-theme .msg-action-row .msg-action-btn{
  box-sizing:border-box!important;
  border:1px solid rgba(255,255,255,.20)!important;
  background:rgba(10,11,19,.76)!important;
  color:rgba(255,255,255,.94)!important;
  box-shadow:0 4px 14px rgba(0,0,0,.52),0 0 0 1px rgba(0,0,0,.40),inset 0 1px 0 rgba(255,255,255,.12)!important;
  -webkit-backdrop-filter:blur(10px);
  backdrop-filter:blur(10px);
  text-shadow:0 1px 3px rgba(0,0,0,.75);
}
.ct-msg-actions button svg,
body.chat-v2-theme .msg-action-row .msg-action-btn svg{
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.72));
}
.ct-msg-actions button:hover,
.ct-msg-actions button:focus-visible,
body.chat-v2-theme .msg-action-row .msg-action-btn:hover,
body.chat-v2-theme .msg-action-row .msg-action-btn:focus-visible{
  border-color:rgba(255,255,255,.38)!important;
  background:rgba(33,34,47,.90)!important;
  color:#fff!important;
  box-shadow:0 6px 17px rgba(0,0,0,.58),0 0 0 2px rgba(255,255,255,.08),inset 0 1px 0 rgba(255,255,255,.18)!important;
  outline:none!important;
}
.ct-msg-actions button.is-unavailable,
body.chat-v2-theme .msg-action-row .msg-action-btn.is-unavailable{
  border-color:rgba(255,255,255,.14)!important;
  background:rgba(10,11,19,.62)!important;
  color:rgba(255,255,255,.72)!important;
}
.ct-msg-actions button[data-action="delete"]:hover,
body.chat-v2-theme .msg-action-row .msg-delete-btn:hover,
body.chat-v2-theme .msg-action-row .msg-delete-btn:focus-visible{
  border-color:rgba(255,154,174,.48)!important;
  background:rgba(93,27,48,.82)!important;
  color:#ffd1da!important;
}

/* Chat uses a filled bubble; Image keeps the shared outline icon readable. */
.eap-chat-mode-trigger>svg:first-child{
  fill:currentColor!important;
  stroke:none!important;
}
.eap-chat-mode-trigger.is-image>svg:first-child{
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.8!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}

/* Dating chat contract for Roleplay chat - keep both conversation surfaces
   on one layout system while retaining each page's existing behavior. */
body.chat-v2-theme .main-char .rp-mode-trigger{
  background:rgba(68,68,72,.88)!important;
  color:#fafafa!important;
}

body.chat-v2-theme .main-char .main-char-message{
  position:fixed!important;
  top:58px!important;
  right:0!important;
  bottom:134px!important;
  left:var(--ps-w,244px)!important;
  width:auto!important;
  height:auto!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  transform:none!important;
  display:block!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  box-sizing:border-box!important;
}
body.chat-v2-theme .main-char .main-char-message:not(.message-full){
  height:auto!important;
  max-height:none!important;
}
body.chat-v2-theme.full-screen-mode .main-char .main-char-message{
  left:0!important;
}
body.chat-v2-theme.full-screen-mode .three-col-layout .main.main-char .main-char-input{
  left:0!important;
  right:0!important;
  width:100%!important;
}
body.chat-v2-theme .main-char .main-char-message .message-width{
  width:min(100%,720px)!important;
  max-width:720px!important;
  min-height:100%!important;
  margin:0 auto!important;
  padding:16px 34px 21px!important;
  box-sizing:border-box!important;
}
body.chat-v2-theme .main-char .main-char-message .list{
  width:100%!important;
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  flex-wrap:nowrap!important;
  box-sizing:border-box!important;
}
body.chat-v2-theme .main-char .main-char-message .list>.li{
  width:auto!important;
  max-width:94%!important;
  min-width:0!important;
  margin-top:10px!important;
  gap:8px!important;
  box-sizing:border-box!important;
}
body.chat-v2-theme .main-char .main-char-message .list>.li .message,
body.chat-v2-theme .main-char .msg-stack{
  width:574px!important;
  max-width:574px!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
body.chat-v2-theme .main-char .main-char-message .list>.li .message{
  padding:13px 15px 12px!important;
  border:1px solid rgba(255,255,255,.075)!important;
  border-radius:17px!important;
  background:rgba(0,0,0,.76)!important;
  color:rgba(239,235,229,.88)!important;
  box-shadow:0 9px 24px rgba(0,0,0,.14)!important;
  backdrop-filter:blur(9px)!important;
  -webkit-backdrop-filter:blur(9px)!important;
}
body.chat-v2-theme .main-char .main-char-message .list>.li .message.user-message{
  border-radius:17px!important;
  border-color:rgba(255,255,255,.07)!important;
  background:rgba(58,42,34,.80)!important;
  color:rgba(246,240,232,.94)!important;
}

/* Keep Dating and Roleplay message bubbles on the same fully rounded shape. */
.ct-msg-body,
.ct-user .ct-msg-body{
  border-radius:15px!important;
}
body.chat-v2-theme .main-char .main-char-message .list>.li .message .w-full{
  min-width:0!important;
  padding-right:0!important;
}
body.chat-v2-theme .main-char .main-char-message .list>.li .message .flex.items-center.justify-between{
  min-height:16px!important;
  margin-bottom:6px!important;
  padding-right:0!important;
}
body.chat-v2-theme .main-char .main-char-message .list>.li .message .text-xs.font_bold{
  color:rgba(255,255,255,.73)!important;
  opacity:1!important;
  font-size:11.5px!important;
  line-height:16px!important;
  letter-spacing:0!important;
}
body.chat-v2-theme .main-char .main-char-message .list>.li .message.user-message .text-xs.font_bold{
  color:rgba(255,255,255,.58)!important;
}
body.chat-v2-theme .main-char .main-char-message .space-message,
body.chat-v2-theme .main-char .main-char-message .space-message.pr-8{
  padding-right:0!important;
  font-size:14.5px!important;
  line-height:1.76!important;
  color:rgba(239,235,229,.88)!important;
  overflow-wrap:anywhere!important;
}
body.chat-v2-theme .main-char .main-char-message .message.user-message .space-message{
  color:rgba(246,240,232,.94)!important;
  font-size:14px!important;
  line-height:1.70!important;
}
body.chat-v2-theme .main-char .main-char-message .space-message .chat-action{
  color:rgba(235,231,225,.76)!important;
}
body.chat-v2-theme .main-char .msg-stack{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  max-width:574px!important;
}
body.chat-v2-theme .main-char .msg-stack.is-user,
body.chat-v2-theme .main-char .msg-action-row.is-user{
  align-items:flex-end!important;
}
body.chat-v2-theme .main-char .msg-stack>.message{
  width:100%!important;
  max-width:none!important;
}
body.chat-v2-theme .main-char .msg-action-row{
  width:100%!important;
  min-height:36px!important;
  margin-top:7px!important;
  padding:0 3px!important;
  gap:4px!important;
  box-sizing:border-box!important;
}

@media(max-width:740px){
  body.chat-v2-theme .main-char .main-char-message{
    top:58px!important;
    bottom:104px!important;
    left:0!important;
    right:0!important;
  }
  body.chat-v2-theme .main-char .main-char-message .message-width{
    width:100%!important;
    max-width:none!important;
    padding:18px 10px 25px!important;
  }
  body.chat-v2-theme .main-char .main-char-message .list>.li{
    width:100%!important;
    max-width:97%!important;
  }
  body.chat-v2-theme .main-char .main-char-message .list>.li .message,
  body.chat-v2-theme .main-char .msg-stack{
    width:auto!important;
    max-width:none!important;
    flex:1 1 auto!important;
  }
  body.chat-v2-theme .main-char .main-char-message .space-message,
  body.chat-v2-theme .main-char .main-char-message .space-message.pr-8{
    font-size:14.25px!important;
    line-height:1.72!important;
  }
}

@media(max-width:430px){
  body.chat-v2-theme .main-char .main-char-message .message-width{
    padding-left:10px!important;
    padding-right:10px!important;
  }
}

/* Canonical Dating composer contract for Roleplay. The RP template keeps its
   behavior-specific classes, but the visible composer uses the same contract
   and state values as Dating so later visual changes stay single-source. */
body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer,
body.chat-v2-theme .main-char .ct-premium-composer.eap-chat-composer{
  width:min(100%,574px)!important;
  min-height:106px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:8px!important;
  padding:8px!important;
  box-sizing:border-box!important;
  border:1px solid rgba(255,255,255,.10)!important;
  border-radius:28px!important;
  background:rgba(36,36,36,.80)!important;
  background-image:none!important;
  box-shadow:0 16px 42px rgba(0,0,0,.34),0 0 0 1px rgba(255,255,255,.04),inset 0 1px 0 rgba(255,255,255,.035)!important;
}
body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer:focus-within,
body.chat-v2-theme .main-char .ct-premium-composer.eap-chat-composer:focus-within{
  border-color:rgba(255,255,255,.10)!important;
  background:rgba(36,36,36,.80)!important;
  background-image:none!important;
  box-shadow:0 16px 42px rgba(0,0,0,.34),0 0 0 1px rgba(255,255,255,.04),inset 0 1px 0 rgba(255,255,255,.035)!important;
}
body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer .eap-chat-composer-input,
body.chat-v2-theme .main-char .ct-premium-composer.eap-chat-composer .eap-chat-composer-input,
body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer #AskContent{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  height:40px!important;
  min-height:40px!important;
  max-height:136px!important;
  flex:0 0 auto!important;
  box-sizing:border-box!important;
  margin:0!important;
  padding:8px 4px!important;
  border:0!important;
  border-width:0!important;
  border-style:none!important;
  border-color:transparent!important;
  border-radius:6px!important;
  outline:0!important;
  resize:none!important;
  background:transparent!important;
  background-color:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
  color:rgba(250,249,252,.96)!important;
  font:500 16px/24px "Manrope",sans-serif!important;
  transition:none!important;
}
body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer .eap-chat-composer-input:focus,
body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer .eap-chat-composer-input:focus-visible,
body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer #AskContent:focus,
body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer #AskContent:focus-visible{
  border:0!important;
  outline:0!important;
  background:transparent!important;
  background-color:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
}
body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer .eap-chat-composer-input::placeholder,
body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer #AskContent::placeholder{
  color:rgba(255,255,255,.47)!important;
  opacity:1!important;
}
body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer .eap-chat-composer-toolbar,
body.chat-v2-theme .main-char .ct-premium-composer.eap-chat-composer .eap-chat-composer-toolbar{
  width:100%!important;
  min-height:40px!important;
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  padding:0!important;
}
body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer .eap-chat-mode-trigger,
body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer .eap-chat-suggest-btn,
body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer .eap-chat-send{
  box-sizing:border-box!important;
  flex:0 0 auto!important;
}
body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer .eap-chat-mode-trigger{
  width:60px!important;
  min-width:60px!important;
  height:40px!important;
  min-height:40px!important;
  padding:0 9px!important;
  border-radius:999px!important;
  background:rgba(68,68,72,.88)!important;
  background-image:none!important;
  color:#fafafa!important;
}
body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer .eap-chat-suggest-btn{
  width:40px!important;
  min-width:40px!important;
  height:40px!important;
  min-height:40px!important;
  padding:0!important;
  background:transparent!important;
  background-image:none!important;
  color:rgba(255,255,255,.54)!important;
}
body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer .eap-chat-send,
body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer .rp-premium-send{
  width:40px!important;
  min-width:40px!important;
  height:40px!important;
  min-height:40px!important;
  flex:0 0 40px!important;
  display:grid!important;
  place-items:center!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:50%!important;
  background:linear-gradient(145deg,#ff6ac6,#ff2aa9 62%,#d95ce4)!important;
  color:#fff!important;
  box-shadow:0 8px 22px rgba(255,43,169,.28),inset 0 1px 0 rgba(255,255,255,.30)!important;
  transform:none!important;
  direction:ltr!important;
}
body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer .eap-chat-send:disabled,
body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer .rp-premium-send:disabled{
  background:#3a3a3f!important;
  color:#77777f!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035)!important;
}
body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer .eap-chat-send svg,
body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer .rp-premium-send svg{
  width:20px!important;
  height:20px!important;
  display:block!important;
  fill:currentColor!important;
  stroke:currentColor!important;
  stroke-width:1.15!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
  transform:none!important;
  transform-origin:center!important;
  direction:ltr!important;
}
body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer .eap-chat-send svg path,
body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer .rp-premium-send svg path{
  transform:none!important;
  transform-origin:center!important;
}
/* Beat the legacy RP selector specificity for the two states users see. */
body.chat-v2-theme .main-char .main-char-input .rp-premium-composer.eap-chat-composer #AskContent.eap-chat-composer-input,
body.chat-v2-theme .main-char .main-char-input .rp-premium-composer.eap-chat-composer #AskContent.eap-chat-composer-input:focus,
body.chat-v2-theme .main-char .main-char-input .rp-premium-composer.eap-chat-composer #AskContent.eap-chat-composer-input:focus-visible{
  border-color:transparent!important;
  background-color:transparent!important;
  color:rgba(250,249,252,.96)!important;
}
body.chat-v2-theme .main-char .main-char-input .rp-premium-composer.eap-chat-composer button.submit-btn.rp-premium-send.eap-chat-send{
  display:grid!important;
  place-items:center!important;
  color:#fff!important;
  transform:none!important;
}
body.chat-v2-theme .main-char .main-char-input .rp-premium-composer.eap-chat-composer button.submit-btn.rp-premium-send.eap-chat-send.is-ready{
  background:linear-gradient(145deg,#ff6ac6,#ff2aa9 62%,#d95ce4)!important;
  color:#fff!important;
  cursor:pointer!important;
}
body.chat-v2-theme .main-char .main-char-input .rp-premium-composer.eap-chat-composer button.submit-btn.rp-premium-send.eap-chat-send:disabled{
  background:#3a3a3f!important;
  color:#77777f!important;
  cursor:default!important;
}
body.chat-v2-theme .main-char .main-char-input #rpForm.rp-premium-composer.eap-chat-composer button.submit-btn.AskBtn.rp-premium-send.eap-chat-send.is-ready{
  color:rgba(246,243,238,.93)!important;
}
body.chat-v2-theme .main-char .main-char-input #rpForm.rp-premium-composer.eap-chat-composer button.submit-btn.AskBtn.rp-premium-send.eap-chat-send:disabled{
  color:#77777f!important;
}
@media(max-width:740px){
  body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer{min-height:104px!important;gap:6px!important;padding:8px!important;border-radius:26px!important}
  body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer .eap-chat-composer-input,
  body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer #AskContent{height:40px!important;min-height:40px!important;padding:7px 4px!important}
  body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer .eap-chat-composer-toolbar{gap:6px!important}
  body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer .eap-chat-mode-trigger{width:58px!important;min-width:58px!important}
}
@media(max-width:430px){
  body.chat-v2-theme .main-char .rp-premium-composer.eap-chat-composer{border-radius:24px!important}
}

/* Keep the RP composer shell on the same full-width track as Dating.
   The legacy RP wrapper had a 736px max-width, which shifted the composer
   to the right whenever the sidebar was hidden in fullscreen. */
body.chat-v2-theme .main-char .main-char-input-wrap.rp-compose-shell{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin:0!important;
  padding:12px 28px 16px!important;
  box-sizing:border-box!important;
}
body.chat-v2-theme .main-char .main-char-input-wrap.rp-compose-shell>.rp-premium-composer{
  width:min(100%,574px)!important;
  max-width:574px!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
body.chat-v2-theme .main-char .rp-premium-composer .rp-premium-send{
  display:grid!important;
  place-items:center!important;
}
body.chat-v2-theme.full-screen-mode .three-col-layout{
  width:100%!important;
  padding-left:0!important;
}
body.chat-v2-theme.full-screen-mode .three-col-layout>.main.main-char{
  width:100%!important;
  margin-left:0!important;
}
body.chat-v2-theme.full-screen-mode .primary-sidebar{
  width:0!important;
  min-width:0!important;
  padding-left:0!important;
  padding-right:0!important;
  transform:translateX(-105%)!important;
  pointer-events:none!important;
  visibility:hidden!important;
}
body.chat-v2-theme.full-screen-mode #psRestoreBtn{
  display:none!important;
}

@media(max-width:740px){
  body.chat-v2-theme .main-char .main-char-input-wrap.rp-compose-shell{
    padding:9px 8px 11px!important;
  }
}

/* Shared WhatsApp-style conversation chrome. Dating and Roleplay keep their
   own background treatment, but the header, bubbles and control geometry are
   deliberately defined once here. */
:root{--eap-shared-chat-header-h:72px;--eap-shared-chat-bubble-max:574px}
.ct-chat{
  grid-template-rows:var(--eap-shared-chat-header-h) minmax(0,1fr) auto!important;
}
.ct-chat .eap-chat-header,
body.chat-v2-theme .main-char .eap-chat-header{
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  min-width:0!important;
  width:auto!important;
  height:var(--eap-shared-chat-header-h)!important;
  min-height:var(--eap-shared-chat-header-h)!important;
  padding:10px 28px!important;
  border-bottom:1px solid rgba(255,255,255,.075)!important;
  background:rgba(7,8,18,.78)!important;
  -webkit-backdrop-filter:blur(18px)!important;
  backdrop-filter:blur(18px)!important;
  z-index:2005!important;
}
.ct-chat .eap-chat-header{position:relative!important}
body.chat-v2-theme .main-char .eap-chat-header{
  position:fixed!important;
  top:0!important;
  left:var(--ps-w,64px)!important;
  right:0!important;
}
.eap-chat-identity{
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  gap:11px!important;
}
.eap-chat-avatar{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  min-height:42px!important;
  flex:0 0 42px!important;
  display:block!important;
  object-fit:cover!important;
  object-position:center top!important;
  border:1px solid rgba(255,255,255,.18)!important;
  border-radius:50%!important;
  box-shadow:0 5px 18px rgba(0,0,0,.34)!important;
}
.eap-chat-name{
  min-width:0!important;
  max-width:min(42vw,360px)!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  color:rgba(255,255,255,.95)!important;
  font-size:15px!important;
  font-weight:700!important;
  line-height:1.2!important;
  letter-spacing:0!important;
}
.ct-chat .ct-chat-corner-actions.eap-chat-corner-actions,
body.chat-v2-theme .main-char .rp-chat-corner-actions.eap-chat-corner-actions{
  position:static!important;
  inset:auto!important;
  width:auto!important;
  height:auto!important;
  min-height:0!important;
  margin-left:auto!important;
  padding:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;
  background:transparent!important;
  background-image:none!important;
  border:0!important;
  box-shadow:none!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
  z-index:2!important;
}
.eap-chat-corner-action{
  width:46px!important;
  height:46px!important;
  min-width:46px!important;
  min-height:46px!important;
  flex:0 0 46px!important;
  border-radius:15px!important;
  background:rgba(12,13,25,.78)!important;
  border-color:rgba(255,255,255,.12)!important;
  box-shadow:0 9px 22px rgba(0,0,0,.27),inset 0 1px 0 rgba(255,255,255,.045)!important;
}
.eap-chat-corner-action:hover{background:rgba(33,29,47,.94)!important;border-color:rgba(255,117,188,.34)!important}

/* No avatar column in either conversation. The identity belongs only in the
   header, like the reference messaging layout. */
.ct-chat .ct-msg-avatar,
body.chat-v2-theme .main-char .main-char-message .list>.li>.img,
body.chat-v2-theme .main-char .main-char-message .list>.li>.flex.aend.jend>.img{
  display:none!important;
}
.ct-chat .ct-msg{
  width:100%!important;
  max-width:100%!important;
  gap:0!important;
  justify-content:center!important;
}
.ct-chat .ct-msg-body{
  width:min(100%,var(--eap-shared-chat-bubble-max))!important;
  max-width:var(--eap-shared-chat-bubble-max)!important;
  border-radius:18px!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
.ct-chat .ct-user .ct-msg-body{border-radius:18px!important}
.ct-chat .ct-message-list{
  width:min(100%,760px)!important;
  padding-top:22px!important;
  padding-bottom:30px!important;
}

/* Roleplay uses a full-bleed scene behind the same message system. */
body.chat-v2-theme .main-char .main-char-message{
  top:var(--eap-shared-chat-header-h)!important;
  right:0!important;
  bottom:126px!important;
  left:var(--ps-w,64px)!important;
  width:auto!important;
  height:auto!important;
  max-height:none!important;
  padding:0!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
}
body.chat-v2-theme .main-char .main-char-message .message-width{
  width:min(100%,760px)!important;
  max-width:760px!important;
  min-height:100%!important;
  padding:22px 22px 30px!important;
}
body.chat-v2-theme .main-char .main-char-message .list{
  width:100%!important;
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:12px!important;
}
body.chat-v2-theme .main-char .main-char-message .list>.li{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin-top:0!important;
  gap:0!important;
  display:flex!important;
  box-sizing:border-box!important;
}
body.chat-v2-theme .main-char .main-char-message .list>.li:not(.jend){justify-content:flex-start!important}
body.chat-v2-theme .main-char .main-char-message .list>.li.jend{justify-content:flex-end!important}
body.chat-v2-theme .main-char .main-char-message .list>.li>.flex.aend.jend{
  width:100%!important;
  min-width:0!important;
  gap:0!important;
  justify-content:flex-end!important;
}
body.chat-v2-theme .main-char .main-char-message .list>.li .message,
body.chat-v2-theme .main-char .msg-stack{
  width:min(100%,var(--eap-shared-chat-bubble-max))!important;
  max-width:var(--eap-shared-chat-bubble-max)!important;
  min-width:0!important;
  border-radius:18px!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
body.chat-v2-theme .main-char .main-char-message .list>.li .message.user-message{
  border-radius:18px!important;
  background:rgba(39,35,48,.78)!important;
  border-color:rgba(255,255,255,.10)!important;
}
body.chat-v2-theme .main-char .main-char-message .list>.li .message:not(.user-message){
  background:rgba(0,0,0,.70)!important;
  border-color:rgba(255,255,255,.10)!important;
}
body.chat-v2-theme .main-char .main-char-message .list>.li .message .w-full{padding-right:0!important}
body.chat-v2-theme .main-char .main-char-message .space-message,
body.chat-v2-theme .main-char .main-char-message .space-message.pr-8{padding-right:0!important}
body.chat-v2-theme .main-char .main-char-input{
  left:var(--ps-w,64px)!important;
  right:0!important;
  width:auto!important;
  bottom:0!important;
  padding:16px 28px 14px!important;
  background:linear-gradient(to top,rgba(0,0,7,.96) 0%,rgba(0,0,8,.84) 62%,transparent 100%)!important;
  z-index:1200!important;
}
body.chat-v2-theme .three-col-layout>.main.main-char .main-char-input{
  left:0!important;
  right:0!important;
  width:100%!important;
  padding:12px 28px 16px!important;
  border:0!important;
  border-top:0!important;
}
body.chat-v2-theme .main-char .main-char-input-wrap.rp-compose-shell{
  width:100%!important;
  max-width:none!important;
  padding:0!important;
}
body.chat-v2-theme .main-char .main-char-input-wrap.rp-compose-shell>.rp-premium-composer{margin:0 auto!important}

body.chat-v2-theme.full-screen-mode .main-char .eap-chat-header{left:0!important}
body.chat-v2-theme.full-screen-mode .main-char .main-char-message{left:0!important}
body.chat-v2-theme.full-screen-mode .main-char .main-char-input{left:0!important}

@media(max-width:740px){
  :root{--eap-shared-chat-header-h:64px}
  .ct-chat{grid-template-rows:var(--eap-shared-chat-header-h) minmax(0,1fr) auto!important}
  .ct-chat .eap-chat-header,
  body.chat-v2-theme .main-char .eap-chat-header{height:64px!important;min-height:64px!important;padding:8px 14px!important}
  body.chat-v2-theme .main-char .eap-chat-header{left:0!important}
  .eap-chat-avatar{width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;flex-basis:38px!important}
  .eap-chat-name{font-size:14px!important;max-width:42vw!important}
  .ct-chat .ct-chat-corner-actions.eap-chat-corner-actions,
  body.chat-v2-theme .main-char .rp-chat-corner-actions.eap-chat-corner-actions{gap:6px!important}
  .eap-chat-corner-action{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;flex-basis:40px!important;border-radius:12px!important}
  .eap-chat-corner-action svg{width:19px!important;height:19px!important}
  .ct-chat .ct-message-list{padding:18px 12px 26px!important}
  body.chat-v2-theme .main-char .main-char-message{top:64px!important;bottom:112px!important;left:0!important}
  body.chat-v2-theme .main-char .main-char-message .message-width{padding:18px 12px 26px!important}
  body.chat-v2-theme .main-char .main-char-input{left:0!important;right:0!important;padding:10px 10px 11px!important}
}

@media(max-width:430px){
  .eap-chat-corner-action{width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;flex-basis:38px!important}
  .eap-chat-corner-actions{gap:4px!important}
  .eap-chat-name{max-width:35vw!important}
}

/* Final mobile parity pass: Roleplay uses the exact same safe areas as
   Dating, including the header clearance and composer side margins. */
@media(max-width:740px){
  body.chat-v2-theme .three-col-layout .main.main-char .main-char-message{
    top:var(--eap-shared-chat-header-h)!important;
    bottom:124px!important;
  }
  body.chat-v2-theme .three-col-layout .main.main-char .main-char-input{
    padding:9px 8px 11px!important;
  }
  body.chat-v2-theme .three-col-layout .main.main-char .main-char-input-wrap.rp-compose-shell{
    padding:0!important;
  }
}

/* Canonical chat frame for Dating and Roleplay.
   Roleplay keeps its scene background and behavior, but the visible chat
   geometry is intentionally the same as Dating. */
:root{
  --eap-chat-canonical-header-h:72px;
  --eap-chat-canonical-composer-h:134px;
  --eap-chat-canonical-message-w:760px;
  --eap-chat-canonical-bubble-w:574px;
  --eap-chat-canonical-bubble-bg:rgba(0,0,0,.76);
}

body.chat-v2-theme .three-col-layout{
  position:fixed!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  margin:0!important;
  padding-left:var(--ps-w,244px)!important;
  box-sizing:border-box!important;
}
body.chat-v2-theme .three-col-layout>.main.main-char{
  position:relative!important;
  flex:1 1 auto!important;
  width:auto!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
}
body.chat-v2-theme .three-col-layout>.main.main-char>.main-width{
  position:static!important;
  width:100%!important;
  max-width:none!important;
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
}
body.chat-v2-theme .main-char .eap-chat-header{
  position:relative!important;
  inset:auto!important;
  width:100%!important;
  height:var(--eap-chat-canonical-header-h)!important;
  min-height:var(--eap-chat-canonical-header-h)!important;
  padding:10px 28px!important;
  box-sizing:border-box!important;
}
body.chat-v2-theme .main-char .eap-chat-header .eap-chat-corner-actions{
  position:static!important;
  inset:auto!important;
  width:auto!important;
  height:auto!important;
  min-height:0!important;
  margin-left:auto!important;
  padding:0!important;
  flex:0 0 auto!important;
  background:transparent!important;
  box-shadow:none!important;
  pointer-events:auto!important;
}

body.chat-v2-theme .main-char .main-char-message{
  position:absolute!important;
  top:var(--eap-chat-canonical-header-h)!important;
  right:0!important;
  bottom:var(--eap-chat-canonical-composer-h)!important;
  left:0!important;
  width:100%!important;
  height:auto!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  box-sizing:border-box!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
}
body.chat-v2-theme .main-char .main-char-message .message-width{
  width:min(100%,var(--eap-chat-canonical-message-w))!important;
  max-width:var(--eap-chat-canonical-message-w)!important;
  min-height:100%!important;
  margin:0 auto!important;
  padding:22px clamp(15px,3.2vw,34px) 30px!important;
  box-sizing:border-box!important;
}
body.chat-v2-theme .main-char .main-char-message .list{
  width:100%!important;
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  flex-wrap:nowrap!important;
  gap:19px!important;
  box-sizing:border-box!important;
}
body.chat-v2-theme .main-char .main-char-message .list>.li{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0!important;
  gap:0!important;
  display:flex!important;
  box-sizing:border-box!important;
}
body.chat-v2-theme .main-char .main-char-message .list>.li>.img,
body.chat-v2-theme .main-char .main-char-message .list>.li>.flex.aend.jend>.img{
  display:none!important;
}
body.chat-v2-theme .main-char .main-char-message .list>.li>.flex.aend.jend{
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  gap:0!important;
  justify-content:center!important;
}
body.chat-v2-theme .main-char .main-char-message .list>.li .message,
body.chat-v2-theme .main-char .msg-stack{
  width:min(100%,var(--eap-chat-canonical-bubble-w))!important;
  max-width:var(--eap-chat-canonical-bubble-w)!important;
  min-width:0!important;
  margin-left:auto!important;
  margin-right:auto!important;
  box-sizing:border-box!important;
}
body.chat-v2-theme .main-char .main-char-message .list>.li .message{
  padding:13px 15px 12px!important;
  border:1px solid rgba(255,255,255,.075)!important;
  border-radius:17px 17px 17px 5px!important;
  background:var(--eap-chat-canonical-bubble-bg)!important;
  color:rgba(239,235,229,.88)!important;
  box-shadow:0 9px 24px rgba(0,0,0,.14)!important;
  backdrop-filter:blur(9px)!important;
  -webkit-backdrop-filter:blur(9px)!important;
}
body.chat-v2-theme .main-char .main-char-message .list>.li .message.user-message{
  border-radius:17px 17px 5px 17px!important;
  border-color:rgba(255,255,255,.075)!important;
  background:var(--eap-chat-canonical-bubble-bg)!important;
  color:rgba(239,235,229,.88)!important;
}
body.chat-v2-theme .main-char .main-char-message .list>.li .message:not(.user-message){
  background:var(--eap-chat-canonical-bubble-bg)!important;
  background-color:var(--eap-chat-canonical-bubble-bg)!important;
  background-image:none!important;
}

body.chat-v2-theme .main-char .main-char-input{
  position:absolute!important;
  left:0!important;
  right:0!important;
  bottom:0!important;
  width:100%!important;
  height:var(--eap-chat-canonical-composer-h)!important;
  min-height:var(--eap-chat-canonical-composer-h)!important;
  padding:12px 28px 16px!important;
  box-sizing:border-box!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  z-index:1200!important;
}
body.chat-v2-theme .main-char .main-char-input .rp-compose-shell{
  width:100%!important;
  max-width:none!important;
  height:auto!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  box-sizing:border-box!important;
}
body.chat-v2-theme .main-char .main-char-input .rp-compose-shell>.rp-premium-composer{
  width:min(100%,var(--eap-chat-canonical-bubble-w))!important;
  max-width:var(--eap-chat-canonical-bubble-w)!important;
  margin:0 auto!important;
}
body.chat-v2-theme.full-screen-mode .three-col-layout{padding-left:0!important}

@media(max-width:740px){
  :root{
    --eap-chat-canonical-header-h:64px;
    --eap-chat-canonical-composer-h:124px;
  }
  body.chat-v2-theme .three-col-layout{padding-left:0!important}
  body.chat-v2-theme .main-char .eap-chat-header{
    height:var(--eap-chat-canonical-header-h)!important;
    min-height:var(--eap-chat-canonical-header-h)!important;
    padding:8px 14px!important;
  }
  body.chat-v2-theme .main-char .main-char-message .message-width{
    width:100%!important;
    max-width:none!important;
    padding:18px 12px 26px!important;
  }
  body.chat-v2-theme .main-char .main-char-input{
    height:var(--eap-chat-canonical-composer-h)!important;
    min-height:var(--eap-chat-canonical-composer-h)!important;
    padding:9px 10px 11px!important;
  }
  body.chat-v2-theme .three-col-layout>.main.main-char .main-char-input{
    padding:9px 10px 11px!important;
    border:0!important;
    border-top:0!important;
  }
  body.chat-v2-theme .ct-chat .eap-chat-header,
  body.chat-v2-theme .three-col-layout>.main.main-char .eap-chat-header{
    padding:8px 10px!important;
  }
  body.chat-v2-theme .ct-chat .eap-chat-header .eap-chat-corner-actions,
  body.chat-v2-theme .three-col-layout>.main.main-char .eap-chat-header .eap-chat-corner-actions{
    gap:4px!important;
  }
}
@media(max-width:430px){
  body.chat-v2-theme .main-char .eap-chat-header{padding-left:10px!important;padding-right:10px!important}
  body.chat-v2-theme .main-char .main-char-input{padding-left:8px!important;padding-right:8px!important}
  body.chat-v2-theme .three-col-layout>.main.main-char .main-char-input{padding-left:8px!important;padding-right:8px!important}
}

/* Final parity contract: the visible Dating and Roleplay chat chrome must
   resolve to the same geometry and paint values. Legacy Roleplay markup keeps
   its hooks for behavior, but it no longer owns any visible chat styling. */
:root{
  --eap-parity-header-h:72px;
  --eap-parity-composer-h:134px;
  --eap-parity-bubble-w:574px;
  --eap-parity-card-bg:rgba(0,0,0,.76);
  --eap-parity-card-border:rgba(255,255,255,.075);
  --eap-parity-card-radius:17px 17px 17px 5px;
  --eap-parity-user-radius:17px 17px 5px 17px;
}

body.chat-v2-theme .three-col-layout>.main.main-char,
body.chat-v2-theme .three-col-layout>.main.main-char *{
  box-sizing:border-box!important;
}

body.chat-v2-theme .three-col-layout>.main.main-char .eap-chat-header{
  height:var(--eap-parity-header-h)!important;
  min-height:var(--eap-parity-header-h)!important;
  padding:10px 28px!important;
  box-sizing:border-box!important;
}
body.chat-v2-theme .three-col-layout>.main.main-char .eap-chat-identity{
  height:42px!important;
  min-height:42px!important;
  gap:11px!important;
  box-sizing:border-box!important;
}
body.chat-v2-theme .three-col-layout>.main.main-char .eap-chat-avatar{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  min-height:42px!important;
  flex:0 0 42px!important;
  box-sizing:border-box!important;
}
body.chat-v2-theme .three-col-layout>.main.main-char .eap-chat-name{
  font-family:inherit!important;
  font-size:15px!important;
  font-weight:700!important;
  line-height:1.2!important;
  letter-spacing:0!important;
}

body.chat-v2-theme .three-col-layout>.main.main-char .main-char-message{
  top:var(--eap-parity-header-h)!important;
  right:0!important;
  bottom:var(--eap-parity-composer-h)!important;
  left:0!important;
  width:100%!important;
  height:auto!important;
  max-height:none!important;
  padding:0!important;
  box-sizing:border-box!important;
}
body.chat-v2-theme .three-col-layout>.main.main-char .main-char-message .message-width{
  width:min(100%,760px)!important;
  max-width:760px!important;
  min-height:100%!important;
  margin:0 auto!important;
  padding:22px clamp(15px,3.2vw,34px) 30px!important;
  box-sizing:border-box!important;
}
body.chat-v2-theme .three-col-layout>.main.main-char .main-char-message .list{
  width:100%!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:19px!important;
  box-sizing:border-box!important;
}
body.chat-v2-theme .three-col-layout>.main.main-char .main-char-message .list>.li{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0!important;
  gap:0!important;
  display:flex!important;
  box-sizing:border-box!important;
}
body.chat-v2-theme .three-col-layout>.main.main-char .main-char-message .list>.li>.img,
body.chat-v2-theme .three-col-layout>.main.main-char .main-char-message .list>.li>.flex.aend.jend>.img{
  display:none!important;
}
body.chat-v2-theme .three-col-layout>.main.main-char .main-char-message .list>.li>.flex.aend.jend{
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  gap:0!important;
  justify-content:center!important;
}
body.chat-v2-theme .three-col-layout>.main.main-char .main-char-message .list>.li .message{
  width:min(100%,var(--eap-parity-bubble-w))!important;
  max-width:var(--eap-parity-bubble-w)!important;
  min-width:0!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding:13px 15px 12px!important;
  border:1px solid var(--eap-parity-card-border)!important;
  border-radius:var(--eap-parity-card-radius)!important;
  background:var(--eap-parity-card-bg)!important;
  background-image:none!important;
  color:rgba(239,235,229,.88)!important;
  box-shadow:0 9px 24px rgba(0,0,0,.14)!important;
  -webkit-backdrop-filter:blur(9px)!important;
  backdrop-filter:blur(9px)!important;
}
body.chat-v2-theme .three-col-layout>.main.main-char .main-char-message .list>.li .message.user-message{
  border-radius:var(--eap-parity-user-radius)!important;
  background:var(--eap-parity-card-bg)!important;
  background-image:none!important;
  color:rgba(232,224,212,.92)!important;
}
body.chat-v2-theme .three-col-layout>.main.main-char .main-char-message .list>.li .message .w-full{
  min-width:0!important;
  padding-right:0!important;
}
body.chat-v2-theme .three-col-layout>.main.main-char .main-char-message .list>.li .message .flex.items-center.justify-between{
  min-height:16px!important;
  margin-bottom:6px!important;
  padding-right:0!important;
}
body.chat-v2-theme .three-col-layout>.main.main-char .main-char-message .list>.li .message .text-xs.font_bold{
  color:rgba(255,255,255,.73)!important;
  opacity:1!important;
  font-family:inherit!important;
  font-size:11.5px!important;
  line-height:16px!important;
  letter-spacing:0!important;
}
body.chat-v2-theme .three-col-layout>.main.main-char .main-char-message .list>.li .message.user-message .text-xs.font_bold{
  color:rgba(255,255,255,.58)!important;
}
body.chat-v2-theme .three-col-layout>.main.main-char .main-char-message .list>.li .message .space-message,
body.chat-v2-theme .three-col-layout>.main.main-char .main-char-message .list>.li .message .space-message.pr-8{
  padding-right:0!important;
  font-family:inherit!important;
  font-size:14.5px!important;
  line-height:1.76!important;
  color:rgba(239,235,229,.88)!important;
  overflow-wrap:anywhere!important;
}
body.chat-v2-theme .three-col-layout>.main.main-char .main-char-message .list>.li .message.user-message .space-message{
  font-size:14px!important;
  line-height:1.70!important;
  color:rgba(246,240,232,.94)!important;
}

body.chat-v2-theme .three-col-layout>.main.main-char .main-char-input{
  height:var(--eap-parity-composer-h)!important;
  min-height:var(--eap-parity-composer-h)!important;
  padding:12px 28px 16px!important;
  background:transparent!important;
  background-image:none!important;
  border:0!important;
  box-shadow:none!important;
  box-sizing:border-box!important;
}
body.chat-v2-theme .three-col-layout>.main.main-char .eap-chat-composer-input{
  font-family:inherit!important;
  font-size:16px!important;
  line-height:24px!important;
  font-weight:400!important;
}
body.chat-v2-theme .three-col-layout>.main.main-char .main-char-input #AskContent.eap-chat-composer-input,
body.chat-v2-theme .three-col-layout>.main.main-char .main-char-input #AskContent.eap-chat-composer-input:focus,
body.chat-v2-theme .three-col-layout>.main.main-char .main-char-input #AskContent.eap-chat-composer-input:focus-visible{
  font:400 16px/24px "Helvetica Neue",Helvetica,Arial,"Microsoft YaHei",sans-serif!important;
}
body.chat-v2-theme .three-col-layout>.main.main-char .eap-chat-composer-input:focus,
body.chat-v2-theme .three-col-layout>.main.main-char .eap-chat-composer-input:focus-visible{
  border:0!important;
  outline:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
body.chat-v2-theme .three-col-layout>.main.main-char .eap-chat-composer-shell{
  box-sizing:border-box!important;
}

/* Keep the foreground controls visually identical when Roleplay has a bright
   scene image underneath them. The scene remains visible around the chrome. */
.ct-chat .eap-chat-header,
body.chat-v2-theme .three-col-layout>.main.main-char .eap-chat-header{
  background:rgb(7,8,18)!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
.eap-chat-corner-action{
  background:rgb(12,13,25)!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
.eap-chat-corner-action:hover{background:rgb(33,29,47)!important}
.eap-chat-composer,
body.chat-v2-theme .three-col-layout>.main.main-char .eap-chat-composer{
  background:rgb(36,36,36)!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
.ct-message-card,
body.chat-v2-theme .three-col-layout>.main.main-char .main-char-message .list>.li .message{
  background:rgb(8,8,13)!important;
  background-image:none!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
.ct-msg-actions button,
body.chat-v2-theme .three-col-layout>.main.main-char .msg-action-row .msg-action-btn{
  background:rgb(10,11,19)!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}

@media(max-width:740px){
  :root{--eap-parity-header-h:64px;--eap-parity-composer-h:124px}
  body.chat-v2-theme .three-col-layout>.main.main-char .eap-chat-header{height:64px!important;min-height:64px!important;padding:8px 10px!important}
  body.chat-v2-theme .three-col-layout>.main.main-char .eap-chat-identity{height:38px!important;min-height:38px!important}
  body.chat-v2-theme .three-col-layout>.main.main-char .eap-chat-avatar{width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;flex-basis:38px!important}
  body.chat-v2-theme .three-col-layout>.main.main-char .main-char-message{top:64px!important;bottom:124px!important}
  body.chat-v2-theme .three-col-layout>.main.main-char .main-char-message .message-width{width:100%!important;max-width:none!important;padding:18px 10px 25px!important}
  body.chat-v2-theme .three-col-layout>.main.main-char .main-char-input{height:124px!important;min-height:124px!important;padding:9px 8px 11px!important}
}

/* 2026080441: final shared message surface. The two chat templates have
   different legacy markup, so this last layer normalizes the visible result
   instead of allowing either template to reintroduce its own bubble rules. */
:root{
  --eap-unified-bubble-bg:rgb(8,8,13);
  --eap-unified-bubble-border:rgba(255,255,255,.075);
  --eap-unified-bubble-max:574px;
}

/* Keep the same usable canvas and header safe area in both templates. */
.ct-app,
body.chat-v2-theme .three-col-layout{
  box-sizing:border-box!important;
  min-width:0!important;
}
.ct-chat,
body.chat-v2-theme .three-col-layout>.main.main-char{
  min-width:0!important;
  min-height:0!important;
  overflow:hidden!important;
}
.ct-chat .eap-chat-header,
body.chat-v2-theme .three-col-layout>.main.main-char .eap-chat-header{
  box-sizing:border-box!important;
  flex:0 0 var(--eap-parity-header-h)!important;
  height:var(--eap-parity-header-h)!important;
  min-height:var(--eap-parity-header-h)!important;
  padding:10px 28px!important;
  border-bottom:1px solid rgba(255,255,255,.075)!important;
  background:rgb(7,8,18)!important;
}
.ct-chat .eap-chat-identity,
body.chat-v2-theme .three-col-layout>.main.main-char .eap-chat-identity{
  height:42px!important;
  min-height:42px!important;
}
.ct-chat .eap-chat-avatar,
body.chat-v2-theme .three-col-layout>.main.main-char .eap-chat-avatar{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  min-height:42px!important;
  flex:0 0 42px!important;
}
.ct-chat .eap-chat-corner-actions,
body.chat-v2-theme .three-col-layout>.main.main-char .eap-chat-corner-actions{
  height:46px!important;
  min-height:46px!important;
  gap:8px!important;
}
.ct-chat .eap-chat-corner-action,
body.chat-v2-theme .three-col-layout>.main.main-char .eap-chat-corner-action{
  width:46px!important;
  height:46px!important;
  min-width:46px!important;
  min-height:46px!important;
  flex:0 0 46px!important;
  border-radius:15px!important;
}

/* Assistant bubbles stay centered in the shared reading column. User
   bubbles shrink to their content and sit on the right like a messaging app. */
.ct-msg,
body.chat-v2-theme .main-char-message .list>.li{
  box-sizing:border-box!important;
  min-width:0!important;
}
.ct-msg .ct-msg-body{
  min-width:0!important;
  max-width:var(--eap-unified-bubble-max)!important;
}
.ct-msg.ct-assistant .ct-msg-body{
  width:min(100%,var(--eap-unified-bubble-max))!important;
}
.ct-msg.ct-user{
  justify-content:flex-end!important;
}
.ct-msg.ct-user .ct-msg-body{
  width:fit-content!important;
  max-width:var(--eap-unified-bubble-max)!important;
  margin-left:auto!important;
}
.ct-msg.ct-user .ct-message-card{
  width:fit-content!important;
  max-width:var(--eap-unified-bubble-max)!important;
}
.ct-msg.ct-user .ct-msg-actions{
  justify-content:flex-end!important;
}
body.chat-v2-theme .main-char-message .list>.li:not(.jend) .message{
  width:min(100%,var(--eap-unified-bubble-max))!important;
  max-width:var(--eap-unified-bubble-max)!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
body.chat-v2-theme .main-char-message .list>.li.jend{
  justify-content:flex-end!important;
}
body.chat-v2-theme .main-char-message .list>.li.jend>.flex.aend.jend{
  justify-content:flex-end!important;
}
body.chat-v2-theme .main-char-message .list>.li.jend .message,
body.chat-v2-theme .main-char-message .list>.li.jend .msg-stack{
  width:fit-content!important;
  max-width:var(--eap-unified-bubble-max)!important;
  margin-left:auto!important;
  margin-right:0!important;
}

/* Both assistant and user surfaces use the same dark card paint. */
.ct-msg .ct-message-card,
body.chat-v2-theme .main-char-message .list>.li .message{
  border:1px solid var(--eap-unified-bubble-border)!important;
  background:var(--eap-unified-bubble-bg)!important;
  background-image:none!important;
  box-shadow:0 9px 24px rgba(0,0,0,.14)!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
.ct-msg.ct-user .ct-message-card,
body.chat-v2-theme .main-char-message .list>.li.jend .message{
  background:var(--eap-unified-bubble-bg)!important;
  background-color:var(--eap-unified-bubble-bg)!important;
}
.ct-msg .ct-msg-actions,
body.chat-v2-theme .main-char-message .msg-action-row{
  box-sizing:border-box!important;
  min-height:36px!important;
  margin-top:7px!important;
}
.ct-msg .ct-msg-actions button,
body.chat-v2-theme .main-char-message .msg-action-row .msg-action-btn{
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  min-height:36px!important;
  flex:0 0 36px!important;
  border-radius:50%!important;
}

/* Preserve the Roleplay scene, but keep it behind the same chat chrome. */
body.chat-v2-theme .bg-tavern,
body.chat-v2-theme .user-tavern{
  z-index:0!important;
}
body.chat-v2-theme .three-col-layout>.main.main-char{
  z-index:1!important;
}
body.chat-v2-theme .three-col-layout>.main.main-char .eap-chat-header,
body.chat-v2-theme .three-col-layout>.main.main-char .main-char-message,
body.chat-v2-theme .three-col-layout>.main.main-char .main-char-input{
  z-index:2!important;
}

@media(max-width:740px){
  .ct-chat .eap-chat-header,
  body.chat-v2-theme .three-col-layout>.main.main-char .eap-chat-header{
    flex-basis:64px!important;
    height:64px!important;
    min-height:64px!important;
    padding:8px 10px!important;
  }
  .ct-chat .eap-chat-identity,
  body.chat-v2-theme .three-col-layout>.main.main-char .eap-chat-identity{
    height:38px!important;
    min-height:38px!important;
  }
  .ct-chat .eap-chat-avatar,
  body.chat-v2-theme .three-col-layout>.main.main-char .eap-chat-avatar{
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    min-height:38px!important;
    flex-basis:38px!important;
  }
  .ct-chat .eap-chat-corner-action,
  body.chat-v2-theme .three-col-layout>.main.main-char .eap-chat-corner-action{
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    min-height:40px!important;
    flex-basis:40px!important;
    border-radius:12px!important;
  }
}
