.artstory-ai {
  width: 100%;
  max-width: 100%;
  margin: 0;
  color: #f6f7fb;
  font-family: inherit;
  overflow-x: hidden;
}

.artstory-ai__panel {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 520px;
  overflow: hidden;
  padding: 70px 20px;
  background:
    radial-gradient(circle at 50% 54%, rgba(27, 45, 126, .28) 0, rgba(8, 12, 28, .42) 29%, rgba(0, 0, 0, 1) 66%),
    #000;
  isolation: isolate;
  box-sizing: border-box;
}

.artstory-ai__panel::before {
  position: absolute;
  inset: 18% 12%;
  z-index: -1;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(34, 64, 184, .22), transparent 68%);
  filter: blur(26px);
  content: "";
}

.artstory-ai__intro {
  width: min(100%, 820px);
  max-width: 100%;
  margin-bottom: 34px;
  text-align: center;
  box-sizing: border-box;
}

.artstory-ai h2 {
  margin: 0;
  color: #f3f4fa;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.artstory-ai__form {
  width: min(100%, 760px);
  max-width: 100%;
  box-sizing: border-box;
}

.artstory-ai__prompt {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 34px;
  align-items: center;
  min-height: 58px;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  background: #1d1d1e;
  padding: 0 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
  box-sizing: border-box;
}

.artstory-ai__prompt::before {
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(90deg, #4969ff, #8f5bff, #3fd2c7, #4969ff);
  background-size: 300% 100%;
  content: "";
  opacity: .08;
  transition: opacity .2s ease;
  animation: artstory-ai-border 5s linear infinite;
}

.artstory-ai__prompt:focus-within::before {
  opacity: .9;
}

.artstory-ai__prompt.is-loading::before {
  opacity: .9;
  animation-duration: 1.6s;
}

.artstory-ai__prompt:focus-within {
  border-color: rgba(255, 255, 255, .18);
}

.artstory-ai__icon,
.artstory-ai__mic {
  color: #eef0f6;
  line-height: 1;
}

.artstory-ai__icon {
  font-size: 30px;
  font-weight: 300;
}

.artstory-ai input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f7f8ff;
  font: inherit;
  font-size: 16px;
  text-overflow: ellipsis;
}

.artstory-ai input::placeholder {
  color: rgba(246, 247, 251, .74);
}

.artstory-ai input:disabled {
  cursor: wait;
  opacity: .78;
}

.artstory-ai__mic {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.artstory-ai__mic:hover,
.artstory-ai__mic:focus-visible {
  background: rgba(255, 255, 255, .1);
  outline: 0;
}

.artstory-ai__mic.is-listening {
  background: #3157db;
  color: #fff;
  transform: scale(1.05);
}

.artstory-ai__mic svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.artstory-ai__status {
  width: min(100%, 760px);
  max-width: 100%;
  min-height: 22px;
  margin-top: 18px;
  color: #dfe4ff;
  font-weight: 600;
  text-align: center;
  overflow-wrap: anywhere;
  box-sizing: border-box;
}

.artstory-ai__result {
  width: min(100%, 960px);
  max-width: 100%;
  margin-top: 28px;
  box-sizing: border-box;
}

.artstory-ai__answer {
  display: grid;
  gap: 18px;
  color: #1b1b1f;
  min-width: 0;
}

.artstory-ai__answer-toolbar {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.artstory-ai__copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 13px;
}

.artstory-ai__copy svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: 0 0 auto;
}

.artstory-ai__answer section {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  background: rgba(255, 255, 255, .95);
  padding: 20px;
  box-sizing: border-box;
}

.artstory-ai__answer h3 {
  margin: 0 0 10px;
  color: #11131a;
  font-size: 20px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.artstory-ai__answer p {
  margin: 0;
  line-height: 1.7;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.artstory-ai__answer ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
}

.artstory-ai__answer li {
  display: grid;
  gap: 2px;
  min-width: 0;
  border-left: 3px solid #3157db;
  padding-left: 12px;
  overflow-wrap: anywhere;
}

.artstory-ai__answer a {
  color: #174c79;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.artstory-ai__answer span,
.artstory-ai__empty {
  color: #645b52;
  font-size: 14px;
}

@keyframes artstory-ai-border {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 300% 50%;
  }
}

@media (max-width: 640px) {
  .artstory-ai__panel {
    min-height: 460px;
    padding: 54px 14px;
  }

  .artstory-ai__intro {
    margin-bottom: 24px;
  }

  .artstory-ai__prompt {
    grid-template-columns: 24px minmax(0, 1fr) 32px;
    min-height: 54px;
    gap: 8px;
    padding: 0 16px;
  }

  .artstory-ai h2 {
    font-size: 28px;
  }

  .artstory-ai input {
    font-size: 15px;
  }

  .artstory-ai__answer {
    gap: 14px;
  }

  .artstory-ai__answer section {
    padding: 16px;
  }

  .artstory-ai__answer h3 {
    font-size: 18px;
  }

  .artstory-ai__mic {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 380px) {
  .artstory-ai__panel {
    padding-right: 10px;
    padding-left: 10px;
  }

  .artstory-ai__prompt {
    grid-template-columns: 20px minmax(0, 1fr) 30px;
    padding: 0 12px;
  }

  .artstory-ai__icon {
    font-size: 25px;
  }
}
