/* Shared by the app and its local UI kit. Keep text opaque. */
.talk-button,.ui-primary {
  position: relative;
  isolation: isolate;
  background: transparent;
  box-shadow: var(--ds-control-glow);
}
.talk-button::before,.ui-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background: var(--ds-interactive-gradient);
  background-size: 220% 220%;
  opacity: .92;
  animation: material-flow 8s ease-in-out infinite alternate;
}
.talk-button:hover,.ui-primary:hover:not(:disabled) { background: transparent; filter: brightness(1.04); }
.talk-button:disabled,.ui-primary:disabled { box-shadow: none; }
.talk-button:disabled::before,.ui-primary:disabled::before { animation: none; }
.chat-bubble.character,.bubble:not(.user),.typing {
  background: var(--ds-character-bubble);
  color: var(--ds-bubble-text);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
[data-theme="subculture"] .chat-bubble.character,[data-theme="subculture"] .bubble:not(.user) {
  box-shadow: 0 0 12px rgba(126,136,238,.12);
}
.chat-bubble.user,.bubble.user { background: var(--ds-user-bubble); color: #fff; }
.chat-composer {
  background: rgba(15,18,24,.58);
  border: 1px solid rgba(235,240,248,.52);
  box-shadow: none;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
[data-theme="subculture"] .chat-composer { box-shadow: none; }
.chat-composer button { background: rgba(9,13,19,.72); color: #fff; }
.chat-composer input::placeholder { color: #c4c5cc; }
@keyframes material-flow { from {background-position:0% 50%} to {background-position:100% 50%} }
@media(prefers-reduced-motion:reduce) {
  .talk-button::before,.ui-primary::before { animation:none; }
}
@media(prefers-reduced-transparency:reduce) {
  .talk-button::before,.ui-primary::before { opacity:1; }
  .chat-bubble.character,.bubble:not(.user),.typing { background:var(--ds-surface); backdrop-filter:none; -webkit-backdrop-filter:none; }
  .chat-bubble.user,.bubble.user,.chat-composer { background:#303139; backdrop-filter:none; -webkit-backdrop-filter:none; }
}
@supports not (backdrop-filter:blur(1px)) {
  .chat-bubble.character,.bubble:not(.user),.typing { background:var(--ds-surface); }
  .chat-composer { background:#303139; }
}

[data-theme="subculture"] .talk-button,
[data-theme="subculture"] .ui-primary { color: #fff; }

/* Keep both violet stops visible while the light travels across the button. */
[data-theme="subculture"] .talk-button::before,
[data-theme="subculture"] .ui-primary::before {
  background-image: linear-gradient(110deg, #432080 0%, #8E58DD 48%, #51258F 100%);
  background-size: 150% 100%;
  opacity: .96;
}
